Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

event-iterator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

event-iterator - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

2

lib/event-iterator.d.ts

@@ -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")
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc