údržba
This commit is contained in:
		
							
								
								
									
										19
									
								
								CyLukTs/lukan/node_modules/is-installed-globally/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								CyLukTs/lukan/node_modules/is-installed-globally/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
/**
 | 
			
		||||
Check if your package was installed globally.
 | 
			
		||||
 | 
			
		||||
@example
 | 
			
		||||
```
 | 
			
		||||
import isInstalledGlobally = require('is-installed-globally');
 | 
			
		||||
 | 
			
		||||
// With `npm install your-package`
 | 
			
		||||
console.log(isInstalledGlobally);
 | 
			
		||||
//=> false
 | 
			
		||||
 | 
			
		||||
// With `npm install --global your-package`
 | 
			
		||||
console.log(isInstalledGlobally);
 | 
			
		||||
//=> true
 | 
			
		||||
```
 | 
			
		||||
*/
 | 
			
		||||
declare const isInstalledGlobally: boolean;
 | 
			
		||||
 | 
			
		||||
export = isInstalledGlobally;
 | 
			
		||||
							
								
								
									
										15
									
								
								CyLukTs/lukan/node_modules/is-installed-globally/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								CyLukTs/lukan/node_modules/is-installed-globally/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
const fs = require('fs');
 | 
			
		||||
const globalDirs = require('global-dirs');
 | 
			
		||||
const isPathInside = require('is-path-inside');
 | 
			
		||||
 | 
			
		||||
module.exports = (() => {
 | 
			
		||||
	try {
 | 
			
		||||
		return (
 | 
			
		||||
			isPathInside(__dirname, globalDirs.yarn.packages) ||
 | 
			
		||||
			isPathInside(__dirname, fs.realpathSync(globalDirs.npm.packages))
 | 
			
		||||
		);
 | 
			
		||||
	} catch {
 | 
			
		||||
		return false;
 | 
			
		||||
	}
 | 
			
		||||
})();
 | 
			
		||||
							
								
								
									
										9
									
								
								CyLukTs/lukan/node_modules/is-installed-globally/license
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								CyLukTs/lukan/node_modules/is-installed-globally/license
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
MIT License
 | 
			
		||||
 | 
			
		||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
 | 
			
		||||
 | 
			
		||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 | 
			
		||||
 | 
			
		||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 | 
			
		||||
 | 
			
		||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
							
								
								
									
										54
									
								
								CyLukTs/lukan/node_modules/is-installed-globally/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								CyLukTs/lukan/node_modules/is-installed-globally/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,54 @@
 | 
			
		||||
{
 | 
			
		||||
	"name": "is-installed-globally",
 | 
			
		||||
	"version": "0.4.0",
 | 
			
		||||
	"description": "Check if your package was installed globally",
 | 
			
		||||
	"license": "MIT",
 | 
			
		||||
	"repository": "sindresorhus/is-installed-globally",
 | 
			
		||||
	"funding": "https://github.com/sponsors/sindresorhus",
 | 
			
		||||
	"author": {
 | 
			
		||||
		"name": "Sindre Sorhus",
 | 
			
		||||
		"email": "sindresorhus@gmail.com",
 | 
			
		||||
		"url": "https://sindresorhus.com"
 | 
			
		||||
	},
 | 
			
		||||
	"engines": {
 | 
			
		||||
		"node": ">=10"
 | 
			
		||||
	},
 | 
			
		||||
	"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": "^3.0.0",
 | 
			
		||||
		"is-path-inside": "^3.0.2"
 | 
			
		||||
	},
 | 
			
		||||
	"devDependencies": {
 | 
			
		||||
		"ava": "^2.4.0",
 | 
			
		||||
		"cpy": "^8.1.1",
 | 
			
		||||
		"del": "^6.0.0",
 | 
			
		||||
		"execa": "^5.0.0",
 | 
			
		||||
		"make-dir": "^3.1.0",
 | 
			
		||||
		"tsd": "^0.14.0",
 | 
			
		||||
		"xo": "^0.37.1"
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										31
									
								
								CyLukTs/lukan/node_modules/is-installed-globally/readme.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								CyLukTs/lukan/node_modules/is-installed-globally/readme.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
# is-installed-globally
 | 
			
		||||
 | 
			
		||||
> Check if your package was installed globally
 | 
			
		||||
 | 
			
		||||
Can be useful if your CLI needs different behavior when installed globally and locally.
 | 
			
		||||
 | 
			
		||||
## Install
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
$ npm install is-installed-globally
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Usage
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
const isInstalledGlobally = require('is-installed-globally');
 | 
			
		||||
 | 
			
		||||
// With `npm install your-package`
 | 
			
		||||
console.log(isInstalledGlobally);
 | 
			
		||||
//=> false
 | 
			
		||||
 | 
			
		||||
// With `npm install --global your-package`
 | 
			
		||||
console.log(isInstalledGlobally);
 | 
			
		||||
//=> true
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Related
 | 
			
		||||
 | 
			
		||||
- [import-global](https://github.com/sindresorhus/import-global) - Import a globally installed module
 | 
			
		||||
- [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module
 | 
			
		||||
- [global-dirs](https://github.com/sindresorhus/global-dirs) - Get the directory of globally installed packages and binaries
 | 
			
		||||
		Reference in New Issue
	
	Block a user