Checks that given package name is installed locally (in current working directory) or globally.
Install
npm i --save detect-installed
npm test
Usage
For more use-cases see the tests
var detectInstalled = require('detect-installed');
detectInstalled('npm');
detectInstalled('npm', function(err, res) {
console.log(err);
console.log(res);
});
detectInstalled('npm', true);
detectInstalled('npm', true, function(err, res) {
console.log(err);
console.log(res);
});
Author
Charlike Mike Reagent
License
Copyright (c) 2015 Charlike Mike Reagent, contributors.
Released under the MIT
license.
Proudly generated by docks(1), April 14, 2015