Skip to content

Instantly share code, notes, and snippets.

@TooTallNate
Last active September 30, 2015 14:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TooTallNate/1811707 to your computer and use it in GitHub Desktop.
Save TooTallNate/1811707 to your computer and use it in GitHub Desktop.
An "async listener" concept for EventEmitters. When the listener has a callback function in its arguments list, then it is doing async work
@shesek
Copy link

shesek commented Jul 7, 2013

Very cool! Checking the function's signature length to detect if its an async listener or not is pretty clever.

I wrote something very similar in CoffeeScript the other day and stumbled here while looking for it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment