npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

which-exclude-npm

1.0.1

@kevva

npmHomeRepoSnykSocket
Downloads:2
$ npm install which-exclude-npm
DailyWeeklyMonthlyYearly

which-exclude-npm Build Status

Find non npm installed binaries in PATH

Install

$ npm install which-exclude-npm

Usage

const whichExcludeNpm = require('which-exclude-npm');

whichExcludeNpm('bash').then(res => {
	console.log(res);
	//=> '/usr/local/bin/bash'
});

whichExcludeNpm('np').catch(err => {
	console.log(err.message);
	//=> 'Found global binary installed by npm'
});

API

whichExcludeNpm(name)

Returns a Promise with the path to the binary. Rejects if a global binary can't be found or if the binary was installed with npm.

name

Type: string

Binary name.

License

MIT © Kevin Mårtensson