@boost/event
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -6,2 +6,18 @@ # Change Log | ||
### 1.0.3 - 2019-08-01 | ||
#### ⚙️ Types | ||
- Refine types and replace `any` with `unknown`. (#58) ([43512fc](https://github.com/milesj/boost/tree/master/packages/event/commit/43512fc)), closes [#58](https://github.com/milesj/boost/tree/master/packages/event/issues/58) | ||
#### 📘 Docs | ||
- Add examples to readmes. ([fa6a90c](https://github.com/milesj/boost/tree/master/packages/event/commit/fa6a90c)) | ||
**Note:** Version bump only for package @boost/event | ||
### 1.0.2 - 2019-07-04 | ||
@@ -8,0 +24,0 @@ |
@@ -49,6 +49,6 @@ "use strict"; | ||
const func = this.validateListener(listener); | ||
const handler = (...args) => { | ||
const handler = ((...args) => { | ||
this.unlisten(handler); | ||
return func(...args); | ||
}; | ||
}); | ||
return this.listen(handler, scope); | ||
@@ -55,0 +55,0 @@ } |
{ | ||
"name": "@boost/event", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A type-safe event system. Designed for Boost applications.", | ||
@@ -26,3 +26,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "95a3ed6211c363720f68a4903197db8e52ef3ccb" | ||
"gitHead": "cf50d411c778a661520be41b0ea1042b31ce900d" | ||
} |
@@ -9,2 +9,17 @@ # Boost Event | ||
```ts | ||
import { Event } from '@boost/event'; | ||
const event = new Event<[string, number]>('name'); | ||
event.listen(listener); | ||
event.emit(['abc', 123]); | ||
``` | ||
## Features | ||
- Isolated event instances for proper type-safety. | ||
- Supports 4 event types: standard, bail, concurrent, and waterfall. | ||
- Listener scopes for targeted emits. | ||
## Installation | ||
@@ -11,0 +26,0 @@ |
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
18869
33