sindresorhus / onetime
Ensure a function is only called once
☆162Updated 10 months ago
Related projects: ⓘ
- Reliably get the terminal window size☆139Updated 10 months ago
- Truncate a string to a specific width in the terminal☆85Updated 10 months ago
- Get an unused filename by appending a number if it exists: `file.txt` → `file (1).txt`☆141Updated 2 years ago
- Check whether a package or organization name is available on npm☆168Updated 7 months ago
- Block users from running your app with root permissions☆98Updated last year
- Toggle the CLI cursor☆102Updated last month
- Copy a file☆121Updated 10 months ago
- Check if argv has a specific flag☆90Updated 3 years ago
- Check if your package was installed globally☆70Updated 10 months ago
- Round a number to a specific number of decimal places: 1.234 → 1.2☆155Updated last year
- Lazy number range generator☆82Updated 8 months ago
- Filter object keys and values into a new object☆100Updated 3 months ago
- Wordwrap a string with ANSI escape codes☆119Updated 10 months ago
- Check if it's the first time the process is run☆79Updated 2 years ago
- Get a random temporary file path☆79Updated last year
- Generate a random integer☆87Updated 3 years ago
- Get all property keys of an object including non-enumerable and inherited ones☆109Updated 3 years ago
- Get the path of the parent module☆77Updated 10 months ago
- Run the Node.js binary no matter what☆138Updated 3 years ago
- Parse text columns, like the output of unix commands☆81Updated 2 years ago
- Boxes for use in the terminal☆94Updated last month
- Extract the actual stack of an error☆67Updated 2 years ago
- Get a random item from an array☆57Updated 2 years ago
- Convert a URL to a valid filename☆80Updated 9 months ago
- Reverse minimist. Convert an object of options into an array of command-line arguments☆184Updated last year
- Convert an object of time properties to milliseconds: `{seconds: 2}` → `2000`☆156Updated 3 years ago
- Check if stdout or stderr is interactive☆115Updated 10 months ago
- Check if the process is running with elevated privileges☆41Updated 3 years ago
- Check if something is a Node.js stream☆111Updated 4 months ago
- Reliable way to to get the height and width of the terminal/console in a node.js environment.☆82Updated last month