0.5.0 • Published 6 years ago

event-enum v0.5.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

event-enum

An enum for JavaScript events. Allows you to replace hard-coded strings like "beforeunload" with ResourceEvent.BEFORE_UNLOAD.

How to install

npm install --save event-enum

How to use

const { ResourceEvent } = require("event-enum");

window.addEventListener(ResourceEvent.BEFORE_UNLOAD, () => {
    // ...
});
0.5.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago