sindresorhus / onetime
Ensure a function is only called once
☆162Updated last year
Alternatives and similar repositories for onetime:
Users that are interested in onetime are comparing it to the libraries listed below
- Reliably get the terminal window size☆140Updated last year
- Truncate a string to a specific width in the terminal☆87Updated last year
- Check if it's the first time the process is run☆78Updated 3 years ago
- Get all property keys of an object including non-enumerable and inherited ones☆108Updated 3 years ago
- Check if your package was installed globally☆70Updated last year
- Lazy number range generator☆81Updated last year
- Get an unused filename by appending a number if it exists: `file.txt` → `file (1).txt`☆140Updated 3 years ago
- Filter object keys and values into a new object☆101Updated 11 months ago
- Hook and modify stdout and stderr☆54Updated 2 years ago
- Block users from running your app with root permissions☆98Updated last year
- Embed data in other data and easily extract it when needed☆72Updated 3 years ago
- Run the Node.js binary no matter what☆138Updated 4 years ago
- Check if argv has a specific flag☆95Updated 3 years ago
- Measure the time a promise takes to resolve☆70Updated last year
- Round a number to a specific number of decimal places: 1.234 → 1.2☆155Updated last year
- Check when the DOM has loaded like `DOMContentLoaded`☆109Updated 8 months ago
- Reverse minimist. Convert an object of options into an array of command-line arguments☆185Updated 2 years ago
- Indent each line in a string☆113Updated 2 years ago
- Convert an object of time properties to milliseconds: `{seconds: 2}` → `2000`☆160Updated 4 years ago
- Simplified high resolution timing☆81Updated 7 months ago
- Define a lazily evaluated property on an object☆65Updated 2 years ago
- Parse text columns, like the output of unix commands☆82Updated 3 years ago
- Toggle the CLI cursor☆107Updated 9 months ago
- Get a random item from an array☆57Updated 3 years ago
- Ensures a value is a valid error by making it one if not☆77Updated 3 years ago
- Find multiple RegExp matches in a string☆92Updated 2 years ago
- Get PID from a port☆79Updated 4 years ago
- Check if stdout or stderr is interactive☆116Updated last year
- Get a random temporary file path☆80Updated 2 years ago
- Check if a namespace on npm is being hogged☆73Updated 5 years ago