Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

npm-prefix

eush77170.8kMIT1.2.0

Get global npm prefix. Respects npmrc configs

bin, config, global, lib, node_modules, npm, npmrc, path, prefix, require, resolve, root

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