where my npm?
  • TypeScript 100%
Find a file
0xA672 ac1c4194ec
Enhance README with more installation options
Updated installation instructions for wherenpm to include additional package managers.
2026-04-25 20:25:05 +08:00
.github/workflows Add write permissions for contents in test workflow 2026-04-25 20:12:45 +08:00
dist ci: update dist [skip ci] 2026-04-25 12:12:56 +00:00
src Refactor npm configuration path resolution logic 2026-04-25 19:51:48 +08:00
.gitignore Add node_modules to .gitignore 2026-04-18 22:10:37 +08:00
LICENSE Initial commit 2026-04-18 21:19:07 +08:00
package-lock.json to 2026-04-24 13:42:41 +08:00
package.json to 2026-04-24 13:42:41 +08:00
README.md Enhance README with more installation options 2026-04-25 20:25:05 +08:00
tsconfig.json to 2026-04-24 13:42:41 +08:00

wherenpm.ts

where my npm?

TypeScript JavaScript License: MIT npm version npm downloads package size

Install

* Using npm:

npm install wherenpm
  • or
pnpm add wherenpm
  • or
yarn add wherenpm
  • or
bun add wherenpm

* Using Github repo url:

npm install github:0xA672/wherenpm.ts #latest main
  • or
npm install github:0xA672/wherenpm.ts#main
  • or
bun add github:0xA672/wherenpm.ts
  • or
pnpm add github:0xA672/wherenpm.ts

Usage

import { getNpmPrefix } from 'wherenpm';
console.log(getNpmPrefix());// => '/usr/local' or 'C:\Users\...\AppData\Roaming\npm'