You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
simpler-emitter/README.md

1.1 KiB

simpler-emitter

27-lines (JSDoc excluded) simple & clean event emitter.

createEmitter()

Create emitter

Returns

Object

emit(event, data)

Call listeners

Parameters

Name Types Description
event string Event name
data Event data

off(event, listener)

Remove listener

Parameters

Name Types Description
event string Event name
listener function Event listener

on(event, listener)

Add listener

Parameters

Name Types Description
event string Event name
listener function Event listener

once(event, listener)

Add one-time listener

Parameters

Name Types Description
event string Event name
listener function Event listener

Documentation partly generated with doxdox