Gathering detailed insights and metrics for detect-installed
Gathering detailed insights and metrics for detect-installed
Gathering detailed insights and metrics for detect-installed
Gathering detailed insights and metrics for detect-installed
is-installed-globally
Check if your package was installed globally
cpu-features
A simple binding to Google's cpu_features library for obtaining information about installed CPU(s)
karma-detect-browsers
Karma runner plugin for detecting all browsers installed on the current system.
detect-installed-browsers
Detect browers installed on a machine, useful for launching them from your app
Checks that given package name is installed locally or globally. Support sync and callback api.
npm install detect-installed
Typescript
Module System
Min. Node Version
Node Version
NPM Version
94.4
Supply Chain
99.4
Quality
76.9
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
7,837,005
Last Day
6,486
Last Week
28,073
Last Month
155,667
Last Year
1,991,716
MIT License
10 Stars
41 Commits
2 Forks
2 Watchers
23 Branches
2 Contributors
Updated on Mar 17, 2020
Minified
Minified + Gzipped
Latest Version
2.0.4
Package Id
detect-installed@2.0.4
Size
5.65 kB
NPM Version
4.0.1
Node Version
7.0.0
Published on
Dec 12, 2016
Cumulative downloads
Total Downloads
Last Day
-3.2%
6,486
Compared to previous day
Last Week
-7.5%
28,073
Compared to previous week
Last Month
-9.1%
155,667
Compared to previous month
Last Year
46.3%
1,991,716
Compared to previous year
1
Checks that given package is installed globally or locally.
You might also be interested in get-installed-path.
(TOC generated by verb using markdown-toc)
Install with npm
$ npm install detect-installed --save
or install using yarn
$ yarn add detect-installed
For more use-cases see the tests
1const detectInstalled = require('detect-installed')
Detect if some package
name
is installed globally or locally. By default checks if it exists in globally installed modules, using global-modules. Passopts.local
to check if it exists in locally installed modules or inopts.cwd
dir.
Params
name
{String}: package nameopts
{Object}: pass opts.local
to check locallyreturns
{Promise}: always resolved promise, never rejectedExample
1const detectInstalled = require('detect-installed')
2
3detectInstalled('npm').then((exists) => {
4 console.log(exists) // => true
5})
6
7detectInstalled('foo-bar-barwerwlekrjw').then((exists) => {
8 console.log(exists) // => false
9})
10
11detectInstalled('npm', {
12 local: true
13}).then((exists) => {
14 console.log(exists) // => false
15})
16
17detectInstalled('global-modules', {
18 local: true
19}).then((exists) => {
20 console.log(exists) // => true
21})
22
23// If you are using it for some sub-directory
24// pass `opts.cwd` to be where the `node_modules`
25// folder is.
26process.chidr('foo-bar-baz')
27detectInstalled('global-modules', {
28 local: true,
29 cwd: '../'
30}).then((exists) => console.log(exists)) // => true
Synchronously check if package
name
exists as locally or globally installed modules.
Params
name
{String}: package nameopts
{Object}: pass opts.local
to check locallyreturns
{Boolean}: false, if error or not exists globally/locallyExample
1const detectInstalled = require('detect-installed') 2 3const exists = detectInstalled.sync('npm') // => true 4const result = detectInstalled.sync('global-modules', { local: true }) // => true
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guidelines for advice on opening issues, pull requests, and coding standards.
If you need some help and can spent some cash, feel free to contact me at CodeMentor.io too.
In short: If you want to contribute to that project, please follow these things
npm run commit
to commit changes instead of git commit
, because it is interactive and user-friendly. It uses commitizen behind the scenes, which follows Conventional Changelog idealogy.npm run release
, which is standard-version and follows Conventional Changelog idealogy.Thanks a lot! :)
Documentation and that readme is generated using verb-generate-readme, which is a verb generator, so you need to install both of them and then run verb
command like that
$ npm install verbose/verb#dev verb-generate-readme --global && verb
Please don't edit the README directly. Any changes to the readme must be made in .verb.md.
Clone repository and run the following in that cloned directory
$ npm install && npm test
Charlike Mike Reagent
Copyright © 2016, Charlike Mike Reagent. Released under the MIT license.
This file was generated by verb-generate-readme, v0.2.0, on December 11, 2016.
Project scaffolded using charlike cli.
No vulnerabilities found.
Reason
no vulnerabilities detected
Reason
all dependencies are pinned
Details
Reason
no dangerous workflow patterns detected
Reason
tokens are read-only in GitHub workflows
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
0 commit(s) out of 30 and 0 issue activity out of 7 found in the last 90 days -- score normalized to 0
Reason
GitHub code reviews found for 1 commits out of the last 30 -- score normalized to 0
Details
Reason
no badge detected
Reason
no update tool detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
project is not fuzzed
Score
Last Scanned on 2022-08-15
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More