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

events-ex

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

events-ex - npm Package Compare versions

Comparing version 2.0.0-alpha.2 to 2.0.0-alpha.3

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [2.0.0-alpha.3](https://github.com/snowyu/events-ex.js/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2023-08-27)
### Features
* add ABORT state constant ([a8b3710](https://github.com/snowyu/events-ex.js/commit/a8b3710ae7f1695263ed0bd9036db31831ed9ae0))
## [2.0.0-alpha.2](https://github.com/snowyu/events-ex.js/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2023-06-13)

@@ -7,0 +14,0 @@

2

docs/classes/event_emitter-1.EventEmitter.md

@@ -25,2 +25,2 @@ [events-ex](../README.md) / [Exports](../modules.md) / [event-emitter](../modules/event_emitter-1.md) / EventEmitter

[src/event-emitter.js:7](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event-emitter.js#L7)
[src/event-emitter.js:7](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event-emitter.js#L7)

@@ -46,3 +46,3 @@ [events-ex](../README.md) / [Exports](../modules.md) / [event-emitter](../modules/event_emitter.md) / EventEmitter

[src/event-emitter.d.ts:7](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event-emitter.d.ts#L7)
[src/event-emitter.d.ts:7](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event-emitter.d.ts#L7)

@@ -72,3 +72,3 @@ ## Methods

[src/event-emitter.d.ts:38](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event-emitter.d.ts#L38)
[src/event-emitter.d.ts:38](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event-emitter.d.ts#L38)

@@ -98,3 +98,3 @@ ___

[src/event-emitter.d.ts:44](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event-emitter.d.ts#L44)
[src/event-emitter.d.ts:44](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event-emitter.d.ts#L44)

@@ -123,3 +123,3 @@ ___

[src/event-emitter.d.ts:66](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event-emitter.d.ts#L66)
[src/event-emitter.d.ts:66](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event-emitter.d.ts#L66)

@@ -148,3 +148,3 @@ ___

[src/event-emitter.d.ts:59](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event-emitter.d.ts#L59)
[src/event-emitter.d.ts:59](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event-emitter.d.ts#L59)

@@ -178,3 +178,3 @@ ___

[src/event-emitter.d.ts:32](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event-emitter.d.ts#L32)
[src/event-emitter.d.ts:32](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event-emitter.d.ts#L32)

@@ -208,3 +208,3 @@ ___

[src/event-emitter.d.ts:16](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event-emitter.d.ts#L16)
[src/event-emitter.d.ts:16](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event-emitter.d.ts#L16)

@@ -238,3 +238,3 @@ ___

[src/event-emitter.d.ts:24](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event-emitter.d.ts#L24)
[src/event-emitter.d.ts:24](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event-emitter.d.ts#L24)

@@ -263,3 +263,3 @@ ___

[src/event-emitter.d.ts:51](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event-emitter.d.ts#L51)
[src/event-emitter.d.ts:51](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event-emitter.d.ts#L51)

@@ -284,3 +284,3 @@ ___

[src/event-emitter.d.ts:52](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event-emitter.d.ts#L52)
[src/event-emitter.d.ts:52](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event-emitter.d.ts#L52)

@@ -306,2 +306,2 @@ ___

[src/event-emitter.d.ts:67](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event-emitter.d.ts#L67)
[src/event-emitter.d.ts:67](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event-emitter.d.ts#L67)

@@ -44,3 +44,3 @@ [events-ex](../README.md) / [Exports](../modules.md) / [event](../modules/event.md) / Event

[src/event.js:8](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event.js#L8)
[src/event.js:8](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event.js#L8)

@@ -57,3 +57,3 @@ ## Properties

[src/event.js:38](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event.js#L38)
[src/event.js:38](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event.js#L38)

@@ -70,3 +70,3 @@ ___

[src/event.js:32](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event.js#L32)
[src/event.js:32](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event.js#L32)

@@ -83,3 +83,3 @@ ___

[src/event.js:26](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event.js#L26)
[src/event.js:26](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event.js#L26)

@@ -102,3 +102,3 @@ ## Methods

[src/event.js:45](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event.js#L45)
[src/event.js:45](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event.js#L45)

@@ -125,2 +125,2 @@ ___

[src/event.js:20](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/event.js#L20)
[src/event.js:20](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/event.js#L20)

@@ -44,2 +44,2 @@ [events-ex](../README.md) / [Exports](../modules.md) / all-off

[src/all-off.js:12](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/all-off.js#L12)
[src/all-off.js:12](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/all-off.js#L12)

@@ -21,2 +21,3 @@ [events-ex](../README.md) / [Exports](../modules.md) / consts

| :------ | :------ |
| `ABORT` | `number` |
| `CONTINUE` | `any` |

@@ -28,2 +29,2 @@ | `DONE` | `number` |

[src/consts.js:5](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/consts.js#L5)
[src/consts.js:6](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/consts.js#L6)

@@ -51,2 +51,2 @@ [events-ex](../README.md) / [Exports](../modules.md) / default-methods

[src/default-methods.js:8](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/default-methods.js#L8)
[src/default-methods.js:8](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/default-methods.js#L8)

@@ -40,2 +40,2 @@ [events-ex](../README.md) / [Exports](../modules.md) / has-listeners

[src/has-listeners.js:10](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/has-listeners.js#L10)
[src/has-listeners.js:10](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/has-listeners.js#L10)

@@ -49,2 +49,2 @@ [events-ex](../README.md) / [Exports](../modules.md) / pipe-async

[src/pipe-async.js:21](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/pipe-async.js#L21)
[src/pipe-async.js:21](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/pipe-async.js#L21)

@@ -49,2 +49,2 @@ [events-ex](../README.md) / [Exports](../modules.md) / pipe

[src/pipe.js:21](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/pipe.js#L21)
[src/pipe.js:21](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/pipe.js#L21)

@@ -46,2 +46,2 @@ [events-ex](../README.md) / [Exports](../modules.md) / unify

[src/unify.js:17](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/unify.js#L17)
[src/unify.js:17](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/unify.js#L17)

@@ -39,2 +39,2 @@ [events-ex](../README.md) / [Exports](../modules.md) / util/array-remove

[src/util/array-remove.js:5](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/util/array-remove.js#L5)
[src/util/array-remove.js:5](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/util/array-remove.js#L5)

@@ -41,2 +41,2 @@ [events-ex](../README.md) / [Exports](../modules.md) / util/object-for-each

[src/util/object-for-each.js:6](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/util/object-for-each.js#L6)
[src/util/object-for-each.js:6](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/util/object-for-each.js#L6)

@@ -40,2 +40,2 @@ [events-ex](../README.md) / [Exports](../modules.md) / util/string-pad

[src/util/string-pad.js:8](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/util/string-pad.js#L8)
[src/util/string-pad.js:8](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/util/string-pad.js#L8)

@@ -39,2 +39,2 @@ [events-ex](../README.md) / [Exports](../modules.md) / util/to-int

[src/util/to-int.js:2](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/util/to-int.js#L2)
[src/util/to-int.js:2](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/util/to-int.js#L2)

@@ -39,2 +39,2 @@ [events-ex](../README.md) / [Exports](../modules.md) / util/valid-callable

[src/util/valid-callable.js:1](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/util/valid-callable.js#L1)
[src/util/valid-callable.js:1](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/util/valid-callable.js#L1)

@@ -39,2 +39,2 @@ [events-ex](../README.md) / [Exports](../modules.md) / util/valid-object

[src/util/valid-object.js:3](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/util/valid-object.js#L3)
[src/util/valid-object.js:3](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/util/valid-object.js#L3)

@@ -33,3 +33,3 @@ [events-ex](../README.md) / [Exports](../modules.md) / wrap-event-emitter

[src/wrap-event-emitter.js:6](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/wrap-event-emitter.js#L6)
[src/wrap-event-emitter.js:6](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/wrap-event-emitter.js#L6)

@@ -58,2 +58,2 @@ ## Functions

[src/wrap-event-emitter.js:33](https://github.com/snowyu/events-ex.js/blob/25f69f3/src/wrap-event-emitter.js#L33)
[src/wrap-event-emitter.js:33](https://github.com/snowyu/events-ex.js/blob/2b0a99d/src/wrap-event-emitter.js#L33)

@@ -80,2 +80,3 @@ events-ex / [Exports](modules.md)

states.ABORT = -1
class MyDb extends EventEmitter {

@@ -102,4 +103,5 @@ get(key) {

}
} else if (result === null) {
// abort default get key.
this.stopped = true // it will skip other listeners if true
} else {
// you can abort to get key by default.
this.result = {state: states.ABORT};

@@ -106,0 +108,0 @@ // this.stopped = true // it will skip other listeners if true

@@ -5,2 +5,3 @@ export namespace states {

export { STOPPED };
export { ABORT };
}

@@ -10,2 +11,3 @@ declare const CONTINUE: any;

declare const STOPPED: 2;
declare const ABORT: -1;
export {};

@@ -10,7 +10,9 @@ "use strict";

const STOPPED = 2;
const ABORT = -1;
const states = {
CONTINUE,
DONE,
STOPPED
STOPPED,
ABORT
};
exports.states = states;
{
"name": "events-ex",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"description": "Browser-friendly enhanced events most compatible with standard node.js, it's powerful eventable ability.",

@@ -5,0 +5,0 @@ "contributors": [

@@ -90,2 +90,3 @@ ### events-ex [![Build Status](https://img.shields.io/travis/snowyu/events-ex.js/master.png)](http://travis-ci.org/snowyu/events-ex.js) [![npm](https://img.shields.io/npm/v/events-ex.svg)](https://npmjs.org/package/events-ex) [![downloads](https://img.shields.io/npm/dm/events-ex.svg)](https://npmjs.org/package/events-ex) [![license](https://img.shields.io/npm/l/events-ex.svg)](https://npmjs.org/package/events-ex)

states.ABORT = -1
class MyDb extends EventEmitter {

@@ -112,4 +113,5 @@ get(key) {

}
} else if (result === null) {
// abort default get key.
this.stopped = true // it will skip other listeners if true
} else {
// you can abort to get key by default.
this.result = {state: states.ABORT};

@@ -116,0 +118,0 @@ // this.stopped = true // it will skip other listeners if true

@@ -80,2 +80,3 @@ ### events-ex [![Build Status](https://img.shields.io/travis/snowyu/events-ex.js/master.png)](http://travis-ci.org/snowyu/events-ex.js) [![npm](https://img.shields.io/npm/v/events-ex.svg)](https://npmjs.org/package/events-ex) [![downloads](https://img.shields.io/npm/dm/events-ex.svg)](https://npmjs.org/package/events-ex) [![license](https://img.shields.io/npm/l/events-ex.svg)](https://npmjs.org/package/events-ex)

states.ABORT = -1
class MyDb extends EventEmitter {

@@ -102,4 +103,5 @@ get(key) {

}
} else if (result === null) {
// abort default get key.
this.stopped = true // it will skip other listeners if true
} else {
// you can abort to get key by default.
this.result = {state: states.ABORT};

@@ -106,0 +108,0 @@ // this.stopped = true // it will skip other listeners if true

const CONTINUE = undefined
const DONE = 1
const STOPPED = 2
const ABORT = -1

@@ -9,2 +10,3 @@ export const states = {

STOPPED,
ABORT,
}

Sorry, the diff of this file is not supported yet

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