Just the event module of jQuery
If you are passionate about developing JavaScript plugins and want to get rid of jQuery, but also enjoy its use of event binding, then this library is very useful for you, which is also its main use case
$ npm i -D just-on
import { on, off, one } from 'just-on'
// bind an event once
one('#btn', 'mouseenter', function () {
console.log('Mouse movement only takes effect once')
})
//bind click event
on('#btn', 'click', function () {
console.log('binded!')
})
//remove click event
off('#btn', 'click')
We just placed the selector parameter in the first position of the method here