where my npm?
- TypeScript 100%
Updated installation instructions for wherenpm to include additional package managers. |
||
|---|---|---|
| .github/workflows | ||
| dist | ||
| src | ||
| .gitignore | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
wherenpm.ts
where my npm?
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'