once
npmv1.4.0Run a function exactly one time
Overview
once is an npm package that run a function exactly one time. It is extremely widely used, with about 127.6M downloads per week and 1 known dependents in the graph. The latest version is 1.4.0, released under the ISC license.
Who should use it
Teams working in the npm ecosystem who need run a function exactly one time and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (127.6M weekly downloads).
- Clear open-source license (ISC).
- Lean dependency tree (2 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of once.
Dependencies
Runtime (1)
Dev (1)
Used by
Popular packages that depend on once.
Alternatives to once
Frequently installed together
Lightweight debugging utility for Node.js and the browser
The ultimate javascript content-type utility.
HTTP server cookie parsing and serialization
A querystring parser that supports nesting and arrays, with a depth limit
HTTP status utility
Create HTTP error objects
Create and parse HTTP Content-Type header
An AST-based pattern checker for JavaScript.
Deprecate all the things
Encode a URL to a percent-encoded form, excluding already-encoded sequences
Node.js final http responder
Higher-level content negotiation
Version history
| Version | Published | License |
|---|---|---|
| 1.4.0latest | 10 years ago | ISC |
| 1.3.3 | 10 years ago | ISC |
| 1.3.2 | 11 years ago | ISC |
| 1.3.1 | 12 years ago | BSD |
| 1.3.0 | 12 years ago | BSD |
| 1.2.0 | 13 years ago | BSD |
| 1.1.1 | 14 years ago | BSD |
Maintainers
Frequently asked questions
How do I install once?
Run `npm install once` to add once to your npm project.
What license is once released under?
once is distributed under the ISC license.
How popular is once?
once has approximately 127,577,857 downloads per week and 1 known dependent packages.