get-installed-path
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -19,3 +19,3 @@ /** | ||
* @example | ||
* const getInstalledPath = require('get-installed-path') | ||
* const { getInstalledPath } = require('get-installed-path') | ||
* | ||
@@ -114,9 +114,9 @@ * getInstalledPath('npm').then((path) => { | ||
* @example | ||
* const getInstalledPath = require('get-installed-path') | ||
* const { getInstalledPathSync } = require('get-installed-path') | ||
* | ||
* const npmPath = getInstalledPath.sync('npm') | ||
* const npmPath = getInstalledPathSync('npm') | ||
* console.log(npmPath) | ||
* // => '/home/charlike/.nvm/path/to/lib/node_modules/npm' | ||
* | ||
* const gmPath = getInstalledPath.sync('global-modules', { local: true }) | ||
* const gmPath = getInstalledPathSync('global-modules', { local: true }) | ||
* console.log(gmPath) | ||
@@ -123,0 +123,0 @@ * // => '~/code/get-installed-path/node_modules/global-modules' |
@@ -25,3 +25,3 @@ /** | ||
* @example | ||
* const getInstalledPath = require('get-installed-path') | ||
* const { getInstalledPath } = require('get-installed-path') | ||
* | ||
@@ -120,9 +120,9 @@ * getInstalledPath('npm').then((path) => { | ||
* @example | ||
* const getInstalledPath = require('get-installed-path') | ||
* const { getInstalledPathSync } = require('get-installed-path') | ||
* | ||
* const npmPath = getInstalledPath.sync('npm') | ||
* const npmPath = getInstalledPathSync('npm') | ||
* console.log(npmPath) | ||
* // => '/home/charlike/.nvm/path/to/lib/node_modules/npm' | ||
* | ||
* const gmPath = getInstalledPath.sync('global-modules', { local: true }) | ||
* const gmPath = getInstalledPathSync('global-modules', { local: true }) | ||
* console.log(gmPath) | ||
@@ -129,0 +129,0 @@ * // => '~/code/get-installed-path/node_modules/global-modules' |
{ | ||
"name": "get-installed-path", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Get installation path where the given package is installed. Works for globally and locally installed packages", | ||
@@ -5,0 +5,0 @@ "repository": "tunnckoCore/get-installed-path", |
@@ -30,3 +30,3 @@ # get-installed-path [![npm version][npmv-img]][npmv-url] [![github release][github-release-img]][github-release-url] [![mit License][license-img]][license-url] [![NPM Downloads Weekly][downloads-weekly-img]][downloads-weekly-url] [![NPM Downloads Total][downloads-total-img]][downloads-total-url] | ||
* [getInstalledPath](#getinstalledpath) | ||
* [.sync](#sync) | ||
* [getInstalledPathSync](#getinstalledpathsync) | ||
- [Related](#related) | ||
@@ -68,3 +68,3 @@ - [Contributing](#contributing) | ||
```jsx | ||
const getInstalledPath = require('get-installed-path') | ||
const { getInstalledPath } = require('get-installed-path') | ||
@@ -120,3 +120,3 @@ getInstalledPath('npm').then((path) => { | ||
### [.sync](src/index.js#L124) | ||
### [getInstalledPathSync](src/index.js#L124) | ||
@@ -136,9 +136,9 @@ > Get installed path of a `name` package synchronous. | ||
```jsx | ||
const getInstalledPath = require('get-installed-path') | ||
const { getInstalledPathSync } = require('get-installed-path') | ||
const npmPath = getInstalledPath.sync('npm') | ||
const npmPath = getInstalledPathSync('npm') | ||
console.log(npmPath) | ||
// => '/home/charlike/.nvm/path/to/lib/node_modules/npm' | ||
const gmPath = getInstalledPath.sync('global-modules', { local: true }) | ||
const gmPath = getInstalledPathSync('global-modules', { local: true }) | ||
console.log(gmPath) | ||
@@ -145,0 +145,0 @@ // => '~/code/get-installed-path/node_modules/global-modules' |
29034