onetime

Ensure a function is only called once

MIT License

Downloads
276.6M
Stars
157
Committers
9

Bot releases are visible (Hide)

onetime - Latest Release

Published by sindresorhus 12 months ago

onetime -

Published by sindresorhus over 3 years ago

Breaking

  • Require Node.js 12 aedfbdb
  • This package is now pure ESM. Please read this.

https://github.com/sindresorhus/onetime/compare/v5.1.2...v6.0.0

onetime -

Published by sindresorhus about 4 years ago

onetime -

Published by sindresorhus about 4 years ago

onetime -

Published by sindresorhus over 5 years ago

  • Refactor TypeScript definition to CommonJS compatible export (#7) 0116edf

https://github.com/sindresorhus/onetime/compare/v5.0.0...v5.1.0

onetime -

Published by sindresorhus over 5 years ago

Breaking:

  • Make the callCount method be attached to the default export in TypeScript instead of being a named export. 895a013
    This is a major version to adhere to semver, but in reality most people will not be affected by this. Only those who use TypeScript and the callCount() method.

https://github.com/sindresorhus/onetime/compare/v4.0.0...v5.0.0

onetime -

Published by sindresorhus over 5 years ago

Breaking:

  • Make .callCount() throw an error if it receives a function not wrapped by onetime 6a7c112

Other:

  • Add TypeScript definition (#6) 6782744

https://github.com/sindresorhus/onetime/compare/v3.0.0...v4.0.0

onetime -

Published by sindresorhus over 5 years ago

Breaking:

  • Require Node.js 6 ba14fdd

Other:

  • Add method for getting call count of a function (#5) 1e9bbae