One event to rule... err that one thing. Making scope complex DOM events safe since 2016
npm install singleton-dom-eventsDOM event manager that strictly allows one event per identifier.
It simply stores the elements and callbacks based on the passed identifier
and ensures they are removed before (re-)adding them.
npm i singleton-dom-events --savejavascript
const setEvent = require('singleton-dom-events')let myCb = => console.log('yay')
setEvent('window-resize', window, 'resize', myCb)
setEvent.remove('window-resize')
``