FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Comparing nodejs:master...ryedin:master · nodejs/node-v0.x-archive · GitHub

This repository was archived by the owner on Apr 22, 2023. It is now read-only.
/ node-v0.x-archive Public archive
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node-v0.x-archive
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
Could not load branches
Nothing to show
{{ refName }}
...
head repository: ryedin/node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Could not load branches
Nothing to show
{{ refName }}
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jun 4, 2010

  1. Added a few simple features to process.EventEmitter:

     - ability to wire listeners via constructor config like so:
        var e = new process.EventEmitter({
            on: {
                someEvent: function() { doSomething(); }
            }
        });
    
     - ability to specify a listener to only execute once:
        e.addListener("someEvent", listener, true);
        //or:
        e.once("someEvent", listener);
        //or:
        var e = new process.EventEmitter({
            once: {
                someEvent: listener
            }
        });
    
     - convenience aliases .on and .fire for methods .addListener and .emit respecitively
        I have an entire framework I'm porting that uses a .on/.fire API for events and if it's all the same to you I think adding these won't pose any issues whatsoever; just makes my life MUCH easier...
    
     - ability to suppress/unsuppress events (indefinitely or just one time)
       e.suppress("test");
       e.emit("test"); // no listeners for 'test' will execute
       e.emit("test"); // ditto
       e.unsuppress("test");
       e.emit("test"); // listeners for 'test' event fire normally again
    
       e.suppressOnce("test");
       e.emit("test"); // no listeners for 'test' will execute
       e.emit("test"); // listeners for 'test' event fire normally again
    ryedin committed Jun 4, 2010
    Configuration menu
    Copy the full SHA
    d9e470f View commit details
    Browse the repository at this point in the history
Loading

Back | FazBrowse Home | New Git URL