@xmpp/events
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -37,4 +37,11 @@ 'use strict' | ||
['on', 'addListener', 'removeListener', 'once', 'emit', 'listenerCount'].forEach(name => { | ||
EventEmitter.prototype[name] = function (...args) { | ||
;[ | ||
'on', | ||
'addListener', | ||
'removeListener', | ||
'once', | ||
'emit', | ||
'listenerCount', | ||
].forEach(name => { | ||
EventEmitter.prototype[name] = function(...args) { | ||
this._emitter[name](...args) | ||
@@ -41,0 +48,0 @@ } |
@@ -7,5 +7,8 @@ 'use strict' | ||
module.exports = function timeout(promise, ms) { | ||
return Promise.race([promise, delay(ms).then(() => { | ||
throw new TimeoutError() | ||
})]) | ||
return Promise.race([ | ||
promise, | ||
delay(ms).then(() => { | ||
throw new TimeoutError() | ||
}), | ||
]) | ||
} |
{ | ||
"name": "@xmpp/events", | ||
"description": "A modern and lightweight EventEmitter implementation.", | ||
"repository": "github:node-xmpp/node-xmpp", | ||
"homepage": "https://github.com/node-xmpp/node-xmpp/tree/master/packages/events", | ||
"bugs": "http://github.com/node-xmpp/node-xmpp/issues", | ||
"version": "0.2.0", | ||
"repository": "github:xmppjs/xmpp.js", | ||
"homepage": "https://github.com/xmppjs/xmpp.js/tree/master/packages/events", | ||
"bugs": "http://github.com/xmppjs/xmpp.js/issues", | ||
"version": "0.3.0", | ||
"license": "ISC", | ||
@@ -14,3 +14,7 @@ "keywords": [ | ||
"EventEmitter" | ||
] | ||
], | ||
"engines": { | ||
"node": ">= 6", | ||
"npm": ">= 2" | ||
} | ||
} |
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
99
3576
8