for-emit-of
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -12,4 +12,4 @@ /// <reference types="node" /> | ||
}; | ||
declare function main<T = any>(emitter: SuperEmitter): AsyncIterable<T>; | ||
declare function main<T = any>(emitter: SuperEmitter, options: Options<T>): AsyncIterable<T>; | ||
export default main; | ||
declare function forEmitOf<T = any>(emitter: SuperEmitter): AsyncIterable<T>; | ||
declare function forEmitOf<T = any>(emitter: SuperEmitter, options: Options<T>): AsyncIterable<T>; | ||
export default forEmitOf; |
@@ -20,3 +20,3 @@ "use strict"; | ||
function main(emitter, options) { | ||
function forEmitOf(emitter, options) { | ||
if (!options) { | ||
@@ -57,3 +57,3 @@ options = defaults; | ||
async function* forEmitOf() { | ||
async function* generator() { | ||
while (events.length || active) { | ||
@@ -80,7 +80,7 @@ if (error) { | ||
return forEmitOf(); | ||
return generator(); | ||
} | ||
var _default = main; | ||
var _default = forEmitOf; | ||
exports.default = _default; | ||
module.exports = exports.default; |
{ | ||
"name": "for-emit-of", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Turn Node.js Events into Async Iterables", | ||
@@ -5,0 +5,0 @@ "main": "./dist", |
6532