Socket
Socket
Sign inDemoInstall

manage-path

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

manage-path

Cross-platform method to add a directory to your $PATH


Version published
Weekly downloads
144K
increased by1.26%
Maintainers
1
Weekly downloads
 
Created

What is manage-path?

The manage-path npm package allows you to easily manipulate the PATH environment variable in Node.js. This can be useful for adding or removing directories from the PATH, ensuring that your scripts and applications can find the executables they need.

What are manage-path's main functionalities?

Add a directory to the PATH

This feature allows you to add a directory to the beginning of the PATH environment variable. This can be useful if you want to ensure that a specific directory is searched first when looking for executables.

const managePath = require('manage-path');
const path = managePath(process.env);
path.unshift('/usr/local/bin');

Remove a directory from the PATH

This feature allows you to remove a directory from the PATH environment variable. This can be useful if you want to ensure that a specific directory is not searched when looking for executables.

const managePath = require('manage-path');
const path = managePath(process.env);
path.remove('/usr/local/bin');

Add a directory to the end of the PATH

This feature allows you to add a directory to the end of the PATH environment variable. This can be useful if you want to ensure that a specific directory is searched last when looking for executables.

const managePath = require('manage-path');
const path = managePath(process.env);
path.push('/usr/local/bin');

Other packages similar to manage-path

Keywords

FAQs

Package last updated on 21 Oct 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc