Socket
Socket
Sign inDemoInstall

sb-npm-path

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sb-npm-path

Get PATH of your node runtime and modules


Version published
Maintainers
1
Install size
10.5 kB
Created

Changelog

Source

3.0.0

  • Removes built-in memoization. Consumers must implement memoization on their end instead.

Readme

Source

NPM-Path

NPM-Path is a helper node module that gives you PATH value including all the locally installed npm bins.

Installation

npm install --save sb-npm-path

API

function getPath(rootDirectory?: string): string
function getPathAsync(rootDirectory?: string): Promise<string>
function clearCache(): void

export default getPath
export { getPath, getPathAsync, clearCache }

Examples

import { exec } from 'sb-exec'
import npmPath from 'npm-path'

export default async function run() {
  const PATH = await npmPath.async(__dirname)
  return await exec('mocha', { env: { PATH } })
}

License

This project is licensed under the terms of MIT License, see the LICENSE file for more info

FAQs

Last updated on 30 Dec 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc