New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@produck/charon-events

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@produck/charon-events - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

2

index.d.ts

@@ -1,1 +0,1 @@

export { SimpleEventEmitter as Simple } from './src/Simple';
export * as Simple from './src/Simple';

@@ -1,1 +0,3 @@

export { SimpleEventEmitter as Simple } from './src/Simple.js';
import * as Simple from './src/Simple.js';
export { Simple };
{
"name": "@produck/charon-events",
"version": "0.1.0",
"description": "event",
"keywords": [
"EventEmitter"
],
"author": "LiuQ-Q",
"homepage": "https://github.com/produck/charon/tree/main/packages/charon-event#readme",
"license": "MIT",
"main": "index.js",
"files": [
"index.js",
"index.d.ts",
"src"
],
"types": "index.d.ts",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/produck/charon.git"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
},
"gitHead": "30076d29929b5b217297a65158207249250cfc98"
"name": "@produck/charon-events",
"version": "0.2.0",
"description": "event",
"keywords": [
"EventEmitter"
],
"author": "LiuQ-Q",
"homepage": "https://github.com/produck/charon/tree/main/packages/charon-event#readme",
"license": "MIT",
"main": "index.js",
"files": [
"index.js",
"index.d.ts",
"src"
],
"types": "index.d.ts",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/produck/charon.git"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
},
"gitHead": "68df374f9ff58ba022bc30d0bf7388162dec564c"
}

@@ -7,3 +7,3 @@ type Listener<C> = (this: C, ...args: any[]) => void;

export class SimpleEventEmitter<C> {
export class SimpleEventEmitter<C = void> {
on(type: string, listener: Listener<C>): void;

@@ -14,2 +14,6 @@

emit(type: string, ...args: any[]): void;
}
}
export function destroy(emitter: SimpleEventEmitter): void;
export const Emitter: typeof SimpleEventEmitter;

@@ -5,3 +5,3 @@ const

export class SimpleEventEmitter {
class SimpleEventEmitter {
constructor(context = undefined) {

@@ -22,3 +22,3 @@ /**

this[EVENT_LISTENER_MAP][type].push(listener);
};
}

@@ -35,3 +35,3 @@ off(type, listener) {

}
};
}

@@ -44,3 +44,14 @@ emit(type, ...args) {

}
};
}
}
}
/**
* @param {SimpleEventEmitter} emitter
* @returns
*/
export const destroy = emitter => {
emitter[EVENT_LISTENER_MAP] = null;
emitter[CONTEXT] = null;
};
export const Emitter = SimpleEventEmitter;
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