Socket
Socket
Sign inDemoInstall

is-installed-globally

Package Overview
Dependencies
4
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.2.0

index.d.ts

5

index.js
'use strict';
const fs = require('fs');
const globalDirs = require('global-dirs');
const isPathInside = require('is-path-inside');
module.exports = isPathInside(__dirname, globalDirs.yarn.packages) || isPathInside(__dirname, globalDirs.npm.packages);
module.exports =
isPathInside(__dirname, globalDirs.yarn.packages) ||
isPathInside(__dirname, fs.realpathSync(globalDirs.npm.packages));

97

package.json
{
"name": "is-installed-globally",
"version": "0.1.0",
"description": "Check if your package was installed globally",
"license": "MIT",
"repository": "sindresorhus/is-installed-globally",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"global",
"package",
"globally",
"module",
"install",
"installed",
"npm",
"yarn",
"is",
"check",
"detect",
"local",
"locally",
"cli",
"bin",
"binary"
],
"dependencies": {
"global-dirs": "^0.1.0",
"is-path-inside": "^1.0.0"
},
"devDependencies": {
"ava": "*",
"execa": "^0.7.0",
"xo": "*"
}
"name": "is-installed-globally",
"version": "0.2.0",
"description": "Check if your package was installed globally",
"license": "MIT",
"repository": "sindresorhus/is-installed-globally",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"global",
"package",
"globally",
"module",
"install",
"installed",
"npm",
"yarn",
"is",
"check",
"detect",
"local",
"locally",
"cli",
"bin",
"binary"
],
"dependencies": {
"global-dirs": "^0.1.1",
"is-path-inside": "^2.1.0"
},
"devDependencies": {
"ava": "^1.4.1",
"cpy": "^7.2.0",
"del": "^4.1.0",
"execa": "^1.0.0",
"make-dir": "^3.0.0",
"tsd": "^0.7.2",
"xo": "^0.24.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc