sindresorhus / has-own-prop
A safer `.hasOwnProperty()`
☆30Updated last year
Related projects ⓘ
Alternatives and complementary repositories for has-own-prop
- Strip redundant indentation and indent the string☆54Updated 3 years ago
- Turn an object into a string of HTML attributes☆49Updated last year
- Check if a path is inside another path☆37Updated 2 years ago
- Create an array with values that are present in the first input array but not additional ones☆38Updated 3 years ago
- Strip the final newline character from a string/buffer☆35Updated 3 weeks ago
- Get a random key from an object☆18Updated 4 months ago
- Check if a string is a scoped npm package name☆24Updated 2 years ago
- Split a string at one or more indices☆23Updated 3 years ago
- Gracefully restore the CLI cursor on exit☆35Updated 3 months ago
- Modify the values of an object☆28Updated 3 years ago
- Lowercase the keys of an object☆40Updated last year
- Find semver versions in a string: `unicorn v1.2.3` → `1.2.3`☆45Updated 7 months ago
- Check if a value is a regular expression☆24Updated 3 years ago
- Truncate a semver version: 1.2.3 → 1.2.0☆17Updated 2 years ago
- Get a random property from an object☆15Updated 4 months ago
- Check if a string matches the name of a Node.js builtin module☆58Updated 6 months ago
- Check if a value is an object☆40Updated 3 years ago
- Expand deeply nested values from an object, with support for advanced features☆17Updated last year
- Get the first path that exists on disk of multiple paths☆58Updated last year
- Check if a number is in a given range☆21Updated 3 years ago
- Get metadata on the default editor or a specific editor☆53Updated last year
- Detect the dominant newline character of a string☆55Updated last year
- Truncate a URL to a specific length☆61Updated 3 years ago
- Define multiple non-enumerable properties at once. Uses `Object.defineProperty` when available; falls back to standard assignment in olde…☆21Updated 3 months ago
- Linkify GitHub issue references☆46Updated last month
- A better `Promise.race()`☆46Updated last year
- Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}☆36Updated 2 years ago
- Get an array of valid, sorted, and cleaned semver versions from an array of strings☆40Updated 3 years ago
- Check if a file path is a compressed file☆16Updated 6 months ago
- Get the number of days in a year☆23Updated 3 years ago