dush
dush copied to clipboard
:clap: Microscopic & functional event emitter in ~350 bytes, extensible through plugins.
### Test case: ``` const emitter = dush() const handler1 = () => { console.log('a') } const handler2 = () => { console.log('a') } emitter.on('a', handler1) emitter.on('a', handler2) emitter.off('a', handler1)...
This PR contains the following updates: | Package | Type | Update | Change | References | |---|---|---|---|---| | rollup | devDependencies | major | `0.67.1` -> `1.1.2` | [source](https://togithub.com/rollup/rollup)...
This PR contains the following updates: | Package | Type | Update | Change | References | |---|---|---|---|---| | rollup-plugin-buble | devDependencies | minor | `0.15.0` -> `0.19.6` | [source](https://togithub.com/rollup/rollup-plugin-buble)...
This PR contains the following updates: | Package | Type | Update | Change | References | |---|---|---|---|---| | rollup | devDependencies | minor | `0.67.1` -> `0.68.2` | [source](https://togithub.com/rollup/rollup)...
This PR contains the following updates: | Package | Type | Update | Change | References | |---|---|---|---|---| | rimraf | devDependencies | patch | `2.6.2` -> `2.6.3` | [source](https://togithub.com/isaacs/rimraf)...
This PR solves the special case when two handlers use two distinct but equal functions. ```js function a () { console.log('a') } function b () { console.log('a') } var emitter...
```js use: function use(plugin, options) { var ret = plugin(app, options) return Object.assign(app, ret) }, ```
Like that ```js const dush = () => { // ... code } const app = dush() app.dush = dush export default app ``` so we can just ```js const...