Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: fn-emitter
node v4.9.1
endpoint
share
tweet
var Emitter = require("fn-emitter"); var Demo = function(){ new Emitter(this); } var demo = new Demo(); var cb = function(msg){ console.log(msg); }; demo.on("test",cb); demo.emit("test","successfully emitted and recieved"); demo.off("test",cb)
Created from: https://runkit.com/npm/fn-emitter
Loading…
no comments
sign in
to comment