event-iterator
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -6,3 +6,3 @@ export declare type PushCallback<T> = (res: T) => void; | ||
export declare type RemoveHandler<T> = (push: PushCallback<T>, stop: StopCallback<T>, fail: FailCallback<T>) => void; | ||
export declare class EventIterator<T> { | ||
export declare class EventIterator<T> implements AsyncIterable<T> { | ||
private listen; | ||
@@ -9,0 +9,0 @@ private remove?; |
{ | ||
"name": "event-iterator", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Convert event emitters and event targets to ES async iterators", | ||
@@ -32,3 +32,3 @@ "homepage": "https://github.com/rolftimmermans/event-iterator", | ||
"ts-node": ">= 3.3", | ||
"typescript": ">= 2.5" | ||
"typescript": ">= 3.3" | ||
}, | ||
@@ -35,0 +35,0 @@ "scripts": { |
@@ -15,3 +15,3 @@ export type PushCallback<T> = (res: T) => void | ||
export class EventIterator<T> { | ||
export class EventIterator<T> implements AsyncIterable<T> { | ||
private listen: ListenHandler<T> | ||
@@ -18,0 +18,0 @@ private remove?: RemoveHandler<T> |
/* Fall back from Symbol.asyncIterator to Symbol.iterator to a new symbol. */ | ||
(Symbol as any).asyncIterator = Symbol.asyncIterator || Symbol.iterator || Symbol.for("Symbol.asyncIterator") | ||
const prop = Object.getOwnPropertyDescriptor((Symbol as any), "asyncIterator") | ||
if (!prop) { | ||
(Symbol as any).asyncIterator = Symbol.iterator || Symbol.for("Symbol.asyncIterator") | ||
} |
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
27136
17
500