onetime
- Version 8.0.0
- Published
- 5.76 kB
- 1 dependency
- MIT license
Install
npm i onetimeyarn add onetimepnpm add onetimeOverview
Ensure a function is only called once
Index
Variables
Type Aliases
Variables
Type Aliases
type OnetimeFunction
type OnetimeFunction<ArgumentsType extends unknown[], ReturnType> = (( ...arguments_: ArgumentsType) => ReturnType) & { readonly [tag]: true };A function that has been wrapped by
onetime.
type Options
type Options = { /** Throw an error when called more than once.
@default false */ readonly throw?: boolean;};Package Files (1)
Dependencies (1)
Dev Dependencies (3)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/onetime.
- Markdown[](https://www.jsdocs.io/package/onetime)
- HTML<a href="https://www.jsdocs.io/package/onetime"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2076 ms. - Missing or incorrect documentation? Open an issue for this package.
