Package Exports
- detect-installed
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (detect-installed) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Checks that given package name is installed locally (in current working directory) or globally.
Install
npm i detect-installed --save
npm test
Usage
For more use-cases see the tests
var detectInstalled = require('detect-installed')
// (sync) checks globally
detectInstalled('npm') //=> true
// (async) checks globally
detectInstalled('npm', function (err, res) {
console.log(err) //=> null
console.log(res) //=> true
})
// (sync) checks locally
detectInstalled('npm', true) //=> false
// (async) checks locally
detectInstalled('npm', true, function (err, res) {
console.log(err) //=> null
console.log(res) //=> false
})
Related
- get-installed-path: Get the installation path of the given package if it is installed globally or… more
- is-missing: Check that given
name
oruser/repo
exists in npm registry or in github as… more - is-installed: Checks that given package is installed on the system - globally or… more
- npm-related: Thin wrapper on top of
helper-related
for generating a list of links to the… more - parse-git-log: Parse default
git log
style to array of objects from git repository of… more
Author
Charlike Mike Reagent
License 
Copyright (c) 2015 Charlike Mike Reagent, contributors.
Released under the MIT
license.
Proudly generated by docks(1) on May 9, 2015