Created
February 18, 2017 20:48
-
-
Save leo60228/3ba76939a2e102d25987c24b40acadd9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function EventEmitter(){let c=[];return{on:(d,f)=>{c.push({a:d,b:f})},emit:d=>{Promise.all(c.filter(f=>f.a==d))}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment