npm-prefix

Get global npm prefix. Respects npmrc configs

Usage no npm install needed!

<script type="module">
  import npmPrefix from 'https://cdn.skypack.dev/npm-prefix';
</script>

README

npm

npm-prefix

Build Status Dependency Status

Get global npm prefix. Respects npmrc configs.

Example

var npmPrefix = require('npm-prefix');

npmPrefix()
//=> '/usr/local'

API

npmPrefix()

Returns the npm prefix.

Install

npm install npm-prefix

License

MIT