sindresorhus / random-object-key
Get a random key from an object
☆18Updated 2 months ago
Related projects: ⓘ
- Get a random property from an object☆15Updated 2 months ago
- Split a string at one or more indices☆23Updated 3 years ago
- Convert matching single-quotes to double-quotes: `I 'love' unicorns` → `I "love" unicorns`☆22Updated 2 years ago
- Prepend `https://` to humanized URLs like `sindresorhus.com` and `file://` to file paths☆24Updated 2 years ago
- Check if a Buffer/Uint8Array is a WebP image☆18Updated 3 years ago
- Check if a path is in the current working directory☆21Updated 3 years ago
- Check if a path is inside another path☆37Updated 2 years ago
- Clone and modify a RegExp instance☆23Updated 2 years ago
- Exclude certain items from an array☆20Updated 3 years ago
- Get the system default UID☆11Updated last year
- Lowercase the keys of an object☆41Updated last year
- Check if a file path is a compressed file☆16Updated 4 months ago
- A safer `.hasOwnProperty()`☆30Updated last year
- Trim a consecutively repeated substring: foo--bar---baz → foo-bar-baz☆19Updated 2 years ago
- Strip the final newline character from a string/buffer☆33Updated 4 months ago
- Truncate a semver version: 1.2.3 → 1.2.0☆17Updated 2 years ago
- Include only certain items in an array☆16Updated 3 years ago
- Modify the keys of an object☆15Updated 2 years ago
- Strip redundant indentation and indent the string☆54Updated 3 years ago
- Strip UTF-8 byte order mark (BOM) from a buffer☆19Updated 10 months ago
- ES2015 Number.isFinite() ponyfill☆19Updated 3 years ago
- Create an array with values that are present in the first input array but not additional ones☆37Updated 3 years ago
- Modify the values of an object☆28Updated 3 years ago
- Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}☆36Updated 2 years ago
- Lax `url.format()` that formats a hostname and port into IPv6-compatible socket form of `hostname:port`☆13Updated 3 years ago
- List of archive file extensions☆11Updated 4 months ago
- Generate a random float☆36Updated 3 years ago
- Ensure a path doesn't contain null bytes☆12Updated 2 years ago
- Check if a number is in a given range☆21Updated 3 years ago
- Check if a value is a function☆27Updated 3 years ago