New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

detect-installed

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detect-installed

Checks that given package name is installed locally (in current working directory) or globally.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25K
decreased by-35.2%
Maintainers
1
Weekly downloads
 
Created
Source

npm mit license build status coverage status deps status

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');

// (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
});

Author

Charlike Mike Reagent

License MIT license

Copyright (c) 2015 Charlike Mike Reagent, contributors.
Released under the MIT license.


Proudly generated by docks(1), April 14, 2015

Keywords

FAQs

Package last updated on 18 Apr 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