Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function deprecated, change "process.EventEmitter.prototype" #47

Open
mayankpatel90 opened this issue Jun 22, 2018 · 1 comment
Open

Comments

@mayankpatel90
Copy link

root@mayank-Vostro-460# cd wikistream
root@mayank-Vostro-460:~/wikistream# gedit node_modules/policyfile/lib/server.js

"gedit node_modules/policyfile/lib/server.js"

/New code,/
/**

  • Proxy the event listener requests to the created Net server
    */
    var EventEmitter = require('events');
    Object.keys(EventEmitter.prototype).forEach(function proxy (key){
    Server.prototype[key] = Server.prototype[key] || function () {
    if (this.socket) {
    this.socket[key].apply(this.socket, arguments);
    }

    return this;
    };
    });

/******* old code*************/
/**

  • Proxy the event listener requests to the created Net server
    */
    Object.keys(process.EventEmitter.prototype).forEach(function proxy (key){
    Server.prototype[key] = Server.prototype[key] || function () {
    if (this.socket) {
    this.socket[key].apply(this.socket, arguments);
    }

    return this;
    };
    });

@edsu
Copy link
Owner

edsu commented Jun 22, 2018

I'm confused, this is installed when you npm install. It's not part of this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants