1.0.2 • Published 2 years ago

event-await v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Promisified Once Event Listener

This package is compatible with node and browser environments and supports commonjs and esm and contains typescript definitions.

Installation

npm install --save event-await # yarn add event-await

Usage

import once from 'event-await';

const event = await once(document, 'DOMContentLoaded');

Removing listener:

const $event = once(element, 'click');

$event.off(); // removes listener

License

This package is licensed under the MIT License.

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago