@tootallnate/once
3.0.1 · 9 Feb 2026MIT60.7M / weekRepositoryHomepagenpmAtom feed
2.0.1 is the newest release of 2.x.
In short
1 breaking2 new2 fixed
- Breaking
Big refactor for v2
Security
1 advisory affects 2.0.0; 2.0.1 fixes them
- Low@tootallnate/once vulnerable to Incorrect Control Flow ScopingGHSA-vpq2-c234-7xj6 · 3 Mar 2026Fixed in 2.0.1
Release note
Major Changes
- Breaking
Big refactor for v2
Returns a regular
Promiseinstead ofCancelablePromise.The Promise is strongly typed when posssible. This is the main new feature.
Always returns the full array of arguments passed to the event handler (i.e. what was previously
once.spread()is now the regularonce()).Compatible with
AbortControllerto remove event listeners before the Promise has been fulfilled.Requires TypeScript v4 or newer.
Jest tests running CI via GitHub Actions.
Minor Changes
Add
README.md: d00821fCreate LICENSE
Patches
Remove test script
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.