@quilted/events
Advanced tools
Comparing version 0.0.0-preview-20230807215208 to 0.0.0-preview-20230807232217
# @quilted/events | ||
## 0.0.0-preview-20230807215208 | ||
## 0.0.0-preview-20230807232217 | ||
@@ -5,0 +5,0 @@ ### Major Changes |
@@ -5,3 +5,3 @@ { | ||
"type": "module", | ||
"version": "0.0.0-preview-20230807215208", | ||
"version": "0.0.0-preview-20230807232217", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "engines": { |
@@ -9,7 +9,7 @@ # `@quilted/events` | ||
# npm | ||
npm install @quilted/graphql --save | ||
npm install @quilted/events --save | ||
# pnpm | ||
pnpm install @quilted/graphql --save | ||
pnpm install @quilted/events --save | ||
# yarn | ||
yarn add @quilted/graphql | ||
yarn add @quilted/events | ||
``` | ||
@@ -19,3 +19,3 @@ | ||
## Emitting and listening for events | ||
### Emitting and listening for events | ||
@@ -55,3 +55,3 @@ This library provides an `EventEmitter` class, which is the main utility you’ll use to work with events. It’s similar to the browser’s [`EventTarget` interface](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget), but instead of accepting only callbacks to listen for events, it turns events into other JavaScript types. | ||
Both `on()` and `once()` accept a [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) option as their second argument, which allows you to cancel the listener. By default, aborting `on()` will cause the async generator to end stop yielding values, and will cause `once()` to resolve its promise with `undefined`. However, you can also pass an `abort` option set to `'reject'` in order to have these method instead reject with `AbortError`s: | ||
Both `on()` and `once()` accept an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) option as their second argument, which allows you to cancel the listener. By default, aborting `on()` will cause the async generator to end stop yielding values, and will cause `once()` to resolve its promise with `undefined`. However, you can also pass an `abort` option set to `'reject'` in order to have these method instead reject with `AbortError`s: | ||
@@ -58,0 +58,0 @@ ```ts |
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
163813