for-emit-of
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -20,2 +20,6 @@ "use strict"; | ||
/** | ||
* @param {import('events').EventEmitter} emitter | ||
* @param {{event: string, transform: () => any}} options | ||
*/ | ||
function forEmitOf(emitter, options) { | ||
@@ -62,3 +66,8 @@ if (!options) { | ||
} | ||
/* We do not want to block the process! | ||
This call allows other processes | ||
a chance to execute. | ||
*/ | ||
await sleep(0); | ||
@@ -65,0 +74,0 @@ const [event, ...rest] = events; |
{ | ||
"name": "for-emit-of", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Turn Node.js Events into Async Iterables", | ||
"main": "./dist", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"scripts": { | ||
@@ -7,0 +8,0 @@ "test": "cross-env ./node_modules/.bin/nyc ./node_modules/.bin/mocha --recursive --exit --timeout=100000 -r ts-node/register test/**/*.test.ts", |
6818
87