@pres/events
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -5,2 +5,6 @@ 'use strict'; | ||
const EVENT = 'event', | ||
NEW_LISTENER = 'newListener', | ||
REMOVE_LISTENER = 'removeListener'; | ||
/** | ||
@@ -45,3 +49,3 @@ * alias.js - event emitter for blessed | ||
this._emit('newListener', [type, listener]); | ||
this._emit(NEW_LISTENER, [type, listener]); | ||
} | ||
@@ -56,3 +60,3 @@ | ||
this._emit('removeListener', [type, listener]); | ||
this._emit(REMOVE_LISTENER, [type, listener]); | ||
@@ -66,3 +70,3 @@ return; | ||
this._emit('removeListener', [type, listener]); | ||
this._emit(REMOVE_LISTENER, [type, listener]); | ||
@@ -101,3 +105,3 @@ return; | ||
let ret; // if (type !== 'event') { | ||
// this._emit('event', [type.replace(/^element /, '')].concat(args)); | ||
// this._emit(EVENT, [type.replace(/^element /, '')].concat(args)); | ||
// } | ||
@@ -126,3 +130,3 @@ | ||
this._emit('event', params); | ||
this._emit(EVENT, params); | ||
@@ -138,3 +142,3 @@ if (this.type === 'screen') return this._emit(type, args); | ||
do { | ||
// el._emit('event', params); | ||
// el._emit(EVENT, params); | ||
if (!el._events[type]) continue; | ||
@@ -141,0 +145,0 @@ if (el._emit(type, args) === false) return false; |
@@ -0,1 +1,5 @@ | ||
const EVENT = 'event', | ||
NEW_LISTENER = 'newListener', | ||
REMOVE_LISTENER = 'removeListener'; | ||
/** | ||
@@ -40,3 +44,3 @@ * alias.js - event emitter for blessed | ||
this._emit('newListener', [type, listener]); | ||
this._emit(NEW_LISTENER, [type, listener]); | ||
} | ||
@@ -51,3 +55,3 @@ | ||
this._emit('removeListener', [type, listener]); | ||
this._emit(REMOVE_LISTENER, [type, listener]); | ||
@@ -61,3 +65,3 @@ return; | ||
this._emit('removeListener', [type, listener]); | ||
this._emit(REMOVE_LISTENER, [type, listener]); | ||
@@ -96,3 +100,3 @@ return; | ||
let ret; // if (type !== 'event') { | ||
// this._emit('event', [type.replace(/^element /, '')].concat(args)); | ||
// this._emit(EVENT, [type.replace(/^element /, '')].concat(args)); | ||
// } | ||
@@ -121,3 +125,3 @@ | ||
this._emit('event', params); | ||
this._emit(EVENT, params); | ||
@@ -133,3 +137,3 @@ if (this.type === 'screen') return this._emit(type, args); | ||
do { | ||
// el._emit('event', params); | ||
// el._emit(EVENT, params); | ||
if (!el._events[type]) continue; | ||
@@ -136,0 +140,0 @@ if (el._emit(type, args) === false) return false; |
{ | ||
"name": "@pres/events", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "EventEmitter for pres", | ||
@@ -37,3 +37,3 @@ "main": "dist/index.cjs.js", | ||
"homepage": "https://github.com/hoyeungw/pres/cluster#readme", | ||
"gitHead": "a7d80d8cb688e66c3381a4c8e51272e3240ea52d" | ||
"gitHead": "61edd1260dc5f346726f8174f5b137a51f12e6a5" | ||
} |
@@ -13,14 +13,25 @@ # @pres/events | ||
[//]: <> (Shields) | ||
[badge-npm-version]: https://flat.badgen.net/npm/v/@pres/cluster-fork | ||
[badge-npm-download-monthly]: https://flat.badgen.net/npm/dm/@pres/cluster-fork | ||
[badge-npm-download-total]:https://flat.badgen.net/npm/dt/@pres/cluster-fork | ||
[badge-npm-dependents]: https://flat.badgen.net/npm/dependents/@pres/cluster-fork | ||
[badge-npm-license]: https://flat.badgen.net/npm/license/@pres/cluster-fork | ||
[badge-pp-install-size]: https://flat.badgen.net/packagephobia/install/@pres/cluster-fork | ||
[badge-github-last-commit]: https://flat.badgen.net/github/last-commit/hoyeungw/pres | ||
[badge-github-commit-count]: https://flat.badgen.net/github/commits/hoyeungw/pres | ||
[//]: <> (Link) | ||
[url-npm]: https://npmjs.org/package/@pres/cluster-fork | ||
[url-pp]: https://packagephobia.now.sh/result?p=@pres/cluster-fork | ||
[url-github]: https://github.com/hoyeungw/pres | ||
@@ -31,2 +42,3 @@ | ||
#### Install | ||
```console | ||
@@ -37,2 +49,3 @@ $ npm install @pres/cluster-fork | ||
#### Usage | ||
```js | ||
@@ -44,2 +57,3 @@ import { Signaler } from '@pres/events' | ||
#### Meta | ||
[LICENSE (MIT)](LICENSE) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12552
312
56