sindresorhus / is-npmView external linksLinks
Check if your code is running as an npm or yarn script
☆66Sep 10, 2025Updated 5 months ago
Alternatives and similar repositories for is-npm
Users that are interested in is-npm are comparing it to the libraries listed below
Sorting:
- ES2015 Number.isFinite() ponyfill☆20Apr 7, 2021Updated 4 years ago
- Check if a path is in the current working directory☆23May 3, 2021Updated 4 years ago
- Check if a path is the current working directory☆22May 10, 2025Updated 9 months ago
- Check if a number is a redirect HTTP status code☆25Apr 17, 2021Updated 4 years ago
- Check if a value is a regular expression☆26Oct 31, 2021Updated 4 years ago
- Lowercase the keys of an object☆41Feb 2, 2026Updated last week
- Node's default require extensions as a separate module☆11Oct 27, 2022Updated 3 years ago
- Prepend `https://` to humanized URLs like `sindresorhus.com` and `localhost`☆66Sep 9, 2025Updated 5 months ago
- Similar to String#trim() but removes only whitespace on the right☆22Jul 9, 2021Updated 4 years ago
- Check whether a binary version satisfies a semver range☆24Apr 3, 2024Updated last year
- Get the diff type of two semver versions: 0.0.1 0.0.2 → patch☆69Sep 15, 2025Updated 5 months ago
- Check if a file path is a binary file☆49Apr 30, 2024Updated last year
- Get the visual width of the widest line in a string - the number of columns required to display it☆40Jan 24, 2026Updated 3 weeks ago
- Modern version of duplexer2☆16Oct 27, 2022Updated 3 years ago
- ES2015 `String#codePointAt()` ponyfill☆23Jan 23, 2021Updated 5 years ago
- Get the set npm registry URL☆57Apr 15, 2025Updated 10 months ago
- Check if your code is running as an npm script☆56Sep 18, 2021Updated 4 years ago
- Repeat a string - fast☆35May 3, 2021Updated 4 years ago
- Check if a string is a scoped npm package name☆25Jul 9, 2022Updated 3 years ago
- Timeout HTTP/HTTPS requests☆51Sep 9, 2025Updated 5 months ago
- Convert matching single-quotes to double-quotes: `I 'love' unicorns` → `I "love" unicorns`☆24Jul 9, 2022Updated 3 years ago
- Prepend `https://` to humanized URLs like `sindresorhus.com` and `file://` to file paths☆25Jul 9, 2022Updated 3 years ago
- Check if a path is inside another path☆40Sep 11, 2025Updated 5 months ago
- Check if a string matches the name of a Node.js builtin module☆63Feb 27, 2025Updated 11 months ago
- Check if a value is an object☆42Apr 16, 2021Updated 4 years ago
- Gracefully restore the CLI cursor on exit☆41Jul 26, 2024Updated last year
- ES2015 Number.isNaN() ponyfill☆29May 2, 2024Updated last year
- Parse/stringify contact info like `Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)`☆37Aug 9, 2021Updated 4 years ago
- Check if a string is email like☆25Nov 11, 2025Updated 3 months ago
- Find semver versions in a string: `unicorn v1.2.3` → `1.2.3`☆46Apr 3, 2024Updated last year
- Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}☆37Feb 26, 2022Updated 3 years ago
- Get the version of a binary in semver format☆42Apr 3, 2024Updated last year
- Modify the filename in a path☆17Jul 9, 2022Updated 3 years ago
- Get the name and version of a macOS release from the Darwin version☆67Jun 11, 2025Updated 8 months ago
- Get the first path that exists on disk of multiple paths☆62Sep 15, 2025Updated 5 months ago
- Get the user home directory with fallback to the system temp directory☆30Apr 16, 2021Updated 4 years ago
- Create an array with values that are present in the first input array but not additional ones☆40Sep 14, 2021Updated 4 years ago
- Check if the character represented by a given Unicode code point is fullwidth☆51Aug 31, 2025Updated 5 months ago
- Get the name of a named function☆34Apr 7, 2021Updated 4 years ago