@klasa/event-iterator
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -6,3 +6,3 @@ /// <reference types="node" /> | ||
*/ | ||
export declare type EventIteratorFilter<V> = (value: V, collected: V[]) => boolean; | ||
export declare type EventIteratorFilter<V> = (value: V) => boolean; | ||
/** | ||
@@ -9,0 +9,0 @@ * Options to be passed to an EventIterator. |
@@ -127,3 +127,3 @@ "use strict"; | ||
push(value) { | ||
if (this.filter(value, __classPrivateFieldGet(this, _queue).slice())) { | ||
if (this.filter(value)) { | ||
__classPrivateFieldGet(this, _queue).push(value); | ||
@@ -130,0 +130,0 @@ if (__classPrivateFieldSet(this, _collected, +__classPrivateFieldGet(this, _collected) + 1) >= __classPrivateFieldGet(this, _limit)) |
{ | ||
"name": "@klasa/event-iterator", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Turns event emitter events into async iterators.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
12046