{"_id":"is-installed-globally","_rev":"3212303","name":"is-installed-globally","description":"Check if your package was installed globally","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2024-02-22T02:25:03.000Z","created":"2017-06-25T22:50:03.892Z","1.0.0":"2023-11-06T19:26:23.806Z","0.4.0":"2021-01-17T09:51:35.046Z","0.3.2":"2020-04-06T08:40:36.718Z","0.3.1":"2019-11-08T16:50:11.144Z","0.3.0":"2019-09-18T19:20:10.166Z","0.2.0":"2019-05-12T13:34:11.901Z","0.1.0":"2017-06-25T22:50:03.892Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-installed-globally.git"},"versions":{"1.0.0":{"name":"is-installed-globally","version":"1.0.0","description":"Check if your package was installed globally","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-installed-globally.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["global","package","globally","module","install","installed","npm","yarn","is","check","detect","local","locally","cli","bin","binary"],"dependencies":{"global-directory":"^4.0.1","is-path-inside":"^4.0.0"},"devDependencies":{"ava":"^5.3.1","cpy":"^8","del":"^7.1.0","execa":"^8.0.1","make-dir":"^4.0.0","tsd":"^0.29.0","xo":"^0.56.0"},"types":"./index.d.ts","gitHead":"722bd075dc65c0c22bb851a0b500777da09f5a06","bugs":{"url":"https://github.com/sindresorhus/is-installed-globally/issues"},"homepage":"https://github.com/sindresorhus/is-installed-globally#readme","_id":"is-installed-globally@1.0.0","_nodeVersion":"20.9.0","_npmVersion":"9.2.0","dist":{"shasum":"08952c43758c33d815692392f7f8437b9e436d5a","size":1807,"noattachment":false,"key":"/is-installed-globally/-/is-installed-globally-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-installed-globally/download/is-installed-globally-1.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-installed-globally_1.0.0_1699298783637_0.1986705305177734"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-11-06T19:26:23.806Z","publish_time":1699298783806,"_source_registry_name":"default","_cnpm_publish_time":1699298783806},"0.4.0":{"name":"is-installed-globally","version":"0.4.0","description":"Check if your package was installed globally","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-installed-globally.git"},"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"},"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"},"gitHead":"6be89e62be8a4930aa902130e782d0bc66750ee3","bugs":{"url":"https://github.com/sindresorhus/is-installed-globally/issues"},"homepage":"https://github.com/sindresorhus/is-installed-globally#readme","_id":"is-installed-globally@0.4.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"9a0fd407949c30f86eb6959ef1b7994ed0b7b520","size":1748,"noattachment":false,"key":"/is-installed-globally/-/is-installed-globally-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-installed-globally/download/is-installed-globally-0.4.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-installed-globally_0.4.0_1610877094909_0.02030835243299145"},"_hasShrinkwrap":false,"publish_time":1610877095046,"_cnpm_publish_time":1610877095046},"0.3.2":{"name":"is-installed-globally","version":"0.3.2","description":"Check if your package was installed globally","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-installed-globally.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["global","package","globally","module","install","installed","npm","yarn","is","check","detect","local","locally","cli","bin","binary"],"dependencies":{"global-dirs":"^2.0.1","is-path-inside":"^3.0.1"},"devDependencies":{"ava":"^2.4.0","cpy":"^7.3.0","del":"^5.1.0","execa":"^2.0.4","make-dir":"^3.0.0","tsd":"^0.10.0","xo":"^0.25.3"},"gitHead":"0383e5970ba3812971b3426515939a6bb34424c5","bugs":{"url":"https://github.com/sindresorhus/is-installed-globally/issues"},"homepage":"https://github.com/sindresorhus/is-installed-globally#readme","_id":"is-installed-globally@0.3.2","_nodeVersion":"10.19.0","_npmVersion":"6.13.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"fd3efa79ee670d1187233182d5b0a1dd00313141","size":1791,"noattachment":false,"key":"/is-installed-globally/-/is-installed-globally-0.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-installed-globally/download/is-installed-globally-0.3.2.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-installed-globally_0.3.2_1586162436572_0.5569743294221912"},"_hasShrinkwrap":false,"publish_time":1586162436718,"_cnpm_publish_time":1586162436718},"0.3.1":{"name":"is-installed-globally","version":"0.3.1","description":"Check if your package was installed globally","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-installed-globally.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"funding":"https://github.com/sponsors/sindresorhus","engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["global","package","globally","module","install","installed","npm","yarn","is","check","detect","local","locally","cli","bin","binary"],"dependencies":{"global-dirs":"^2.0.1","is-path-inside":"^3.0.1"},"devDependencies":{"ava":"^2.4.0","cpy":"^7.3.0","del":"^5.1.0","execa":"^2.0.4","make-dir":"^3.0.0","tsd":"^0.10.0","xo":"^0.25.3"},"gitHead":"f36107f2b4dd90705ec46759115ae8ae3fd40495","bugs":{"url":"https://github.com/sindresorhus/is-installed-globally/issues"},"homepage":"https://github.com/sindresorhus/is-installed-globally#readme","_id":"is-installed-globally@0.3.1","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"679afef819347a72584617fd19497f010b8ed35f","size":1753,"noattachment":false,"key":"/is-installed-globally/-/is-installed-globally-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-installed-globally/download/is-installed-globally-0.3.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-installed-globally_0.3.1_1573231810999_0.4119043869206982"},"_hasShrinkwrap":false,"publish_time":1573231811144,"_cnpm_publish_time":1573231811144},"0.3.0":{"name":"is-installed-globally","version":"0.3.0","description":"Check if your package was installed globally","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-installed-globally.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["global","package","globally","module","install","installed","npm","yarn","is","check","detect","local","locally","cli","bin","binary"],"dependencies":{"global-dirs":"^2.0.0","is-path-inside":"^3.0.1"},"devDependencies":{"ava":"^2.4.0","cpy":"^7.3.0","del":"^5.1.0","execa":"^2.0.4","make-dir":"^3.0.0","tsd":"^0.7.4","xo":"^0.24.0"},"gitHead":"7917804740e42e1d3ad8a80aa3e8fc34e2e4c87a","bugs":{"url":"https://github.com/sindresorhus/is-installed-globally/issues"},"homepage":"https://github.com/sindresorhus/is-installed-globally#readme","_id":"is-installed-globally@0.3.0","_nodeVersion":"8.16.1","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"611fe6b52266ffb5465cb4c58c8470dfdebd9e20","size":1759,"noattachment":false,"key":"/is-installed-globally/-/is-installed-globally-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-installed-globally/download/is-installed-globally-0.3.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-installed-globally_0.3.0_1568834410049_0.4011597480858524"},"_hasShrinkwrap":false,"publish_time":1568834410166,"_cnpm_publish_time":1568834410166},"0.2.0":{"name":"is-installed-globally","version":"0.2.0","description":"Check if your package was installed globally","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-installed-globally.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"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"},"gitHead":"4a428988d6f836d36e664d62dba2fec39949ef34","bugs":{"url":"https://github.com/sindresorhus/is-installed-globally/issues"},"homepage":"https://github.com/sindresorhus/is-installed-globally#readme","_id":"is-installed-globally@0.2.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"8cde07ade508458b51f14bcda315ffaf4898de30","size":1765,"noattachment":false,"key":"/is-installed-globally/-/is-installed-globally-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-installed-globally/download/is-installed-globally-0.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-installed-globally_0.2.0_1557668051770_0.923316711899127"},"_hasShrinkwrap":false,"publish_time":1557668051901,"_cnpm_publish_time":1557668051901},"0.1.0":{"name":"is-installed-globally","version":"0.1.0","description":"Check if your package was installed globally","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-installed-globally.git"},"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":"*"},"gitHead":"c8de3eb10412caceb8f005a4ad2b2e91b09caedb","bugs":{"url":"https://github.com/sindresorhus/is-installed-globally/issues"},"homepage":"https://github.com/sindresorhus/is-installed-globally#readme","_id":"is-installed-globally@0.1.0","_shasum":"0dfd98f5a9111716dd535dda6492f67bf3d25a80","_from":".","_npmVersion":"4.6.1","_nodeVersion":"8.0.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"0dfd98f5a9111716dd535dda6492f67bf3d25a80","size":1630,"noattachment":false,"key":"/is-installed-globally/-/is-installed-globally-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-installed-globally/download/is-installed-globally-0.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-installed-globally-0.1.0.tgz_1498431002972_0.9673243085853755"},"directories":{},"publish_time":1498431003892,"_hasShrinkwrap":false,"_cnpm_publish_time":1498431003892}},"readme":"# is-installed-globally\n\n> Check if your package was installed globally\n\nCan be useful if your CLI needs different behavior when installed globally and locally.\n\n## Install\n\n```sh\nnpm install is-installed-globally\n```\n\n## Usage\n\n```js\nimport isInstalledGlobally from 'is-installed-globally';\n\n// With `npm install your-package`\nconsole.log(isInstalledGlobally);\n//=> false\n\n// With `npm install --global your-package`\nconsole.log(isInstalledGlobally);\n//=> true\n```\n\n## Related\n\n- [import-global](https://github.com/sindresorhus/import-global) - Import a globally installed module\n- [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module\n- [global-directory](https://github.com/sindresorhus/global-directory) - Get the directory of globally installed packages and binaries\n","_attachments":{},"homepage":"https://github.com/sindresorhus/is-installed-globally#readme","bugs":{"url":"https://github.com/sindresorhus/is-installed-globally/issues"},"license":"MIT"}