2.0.0 • Published 6 years ago

npm-cache-path v2.0.0

Weekly downloads
413
License
ISC
Repository
github
Last release
6 years ago

npm-cache-path

npm version Build Status Coverage Status

Get the path of npm cache folder

const npmCachePath = require('npm-cache-path');

(async () => {
  await npmCachePath(); //=> '/Users/shinnn/.npm'
})();

Installation

Use npm.

npm install npm-cache-path

API

const npmCachePath = require('npm-cache-path');

npmCachePath()

Return: Promise<string>

It tries to get the path of npm cache folder, first from the environment variables, second from the stdout of npm config get cache command.

// npm_config_cache=/foo/bar node ./example.js

(async () => {
  await npmCachePath(); //=> '/foo/bar'
})();

License

ISC License © 2018 Shinnosuke Watanabe

2.0.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago

0.0.0

7 years ago