sindresorhus / random-item
Get a random item from an array
☆57Updated 3 years ago
Alternatives and similar repositories for random-item:
Users that are interested in random-item are comparing it to the libraries listed below
- Get the first path that exists on disk of multiple paths☆58Updated 2 years ago
- Exit the process when the `esc` key is pressed☆56Updated last year
- Filter object keys and values into a new object☆101Updated 11 months ago
- Run promise-returning & async functions repeatedly until you end it☆45Updated 3 years ago
- Strip redundant indentation and indent the string☆54Updated 4 years ago
- Check if your package was installed globally☆70Updated last year
- Make a function mimic another one☆94Updated 6 months ago
- Wait for any promise to be fulfilled☆54Updated 2 years ago
- Regular expression for matching issue references☆49Updated 7 months ago
- Truncate a URL to a specific length☆61Updated 4 years ago
- Convert directories to glob compatible strings☆44Updated 5 years ago
- Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}☆37Updated 3 years ago
- Determine if a function is an ES6 arrow function or not.☆23Updated 11 months ago
- Check if argv has a specific flag☆95Updated 3 years ago
- Check if a file path is a binary file☆44Updated last year
- Fill in a range of numbers or letters, positive or negative, optionally passing an increment or multiplier to use.☆59Updated 9 months ago
- Lazy number range generator☆81Updated last year
- Reverse minimist. Convert an object of options into an array of command-line arguments☆185Updated 2 years ago
- Get the visual width of the widest line in a string - the number of columns required to display it☆37Updated last year
- Indent each line in a string☆113Updated 2 years ago
- Find multiple RegExp matches in a string☆92Updated 2 years ago
- Get an unused filename by appending a number if it exists: `file.txt` → `file (1).txt`☆140Updated 3 years ago
- Get all email addresses in a string☆58Updated 3 years ago
- Run a piece of code when the javascript process stops. Works in all environments (browsers, nodejs..)☆55Updated this week
- Check if the process is running with elevated privileges☆41Updated 3 years ago
- Ensures a value is a valid error by making it one if not☆77Updated 3 years ago
- Truncate a string to a specific width in the terminal☆87Updated last year
- While a condition returns true, calls a function repeatedly, and then resolves the promise☆54Updated 6 months ago
- Convert a file path to a file URL: `unicorn.jpg` → `file:///Users/sindresorhus/unicorn.jpg`☆61Updated last year
- A better `Promise.race()`☆46Updated 2 years ago