mini-listener
v1.0.4
Published
A minimal event manager
Downloads
2
Readme
Mini Listener
A minimal event manager
Instalation
npm install --save mini-listener
Usage
const listener = require('mini-listener');
//OR
import listener from 'mini-listener'
listener.add(type, fn, ctx = window, id = 'window')
Add an event listener on window by default
listener.remove(type, fn, id = 'window')
Remove an event listener on window by default