{"_id":"global-modules-path","_rev":"269897","name":"global-modules-path","description":"Returns path to globally installed package","dist-tags":{"latest":"2.3.1"},"maintainers":[{"name":"rosen_vladimirov","email":"rosen.vladimirov.91@gmail.com"},{"name":"tsvetie","email":"tsvetelina.e.ivanova@gmail.com"}],"time":{"modified":"2021-06-03T17:18:50.000Z","created":"2016-11-01T07:29:27.504Z","2.3.1":"2018-11-30T14:42:53.583Z","2.3.0":"2018-07-20T07:20:45.182Z","2.2.0":"2018-07-19T10:21:53.258Z","2.1.0":"2018-03-22T21:03:50.112Z","2.0.0":"2017-06-29T21:22:35.820Z","1.0.0":"2016-11-01T07:29:27.504Z"},"users":{},"author":{"name":"Telerik","email":"support@telerik.com"},"repository":{"type":"git","url":"git+https://github.com/rosen-vladimirov/global-modules-path.git"},"versions":{"2.3.1":{"name":"global-modules-path","version":"2.3.1","description":"Returns path to globally installed package","main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/mocha/bin/_mocha -- --recursive --reporter spec-xunit-file --timeout 1500 test/","lint":"eslint lib/* test/*"},"repository":{"type":"git","url":"git+https://github.com/rosen-vladimirov/global-modules-path.git"},"keywords":["npm","global","installed","path"],"author":{"name":"Telerik","email":"support@telerik.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/rosen-vladimirov/global-modules-path/issues"},"homepage":"https://github.com/rosen-vladimirov/global-modules-path#readme","devDependencies":{"chai":"3.5.0","eslint":"3.8.1","istanbul":"0.4.5","mocha":"3.1.2","spec-xunit-file":"0.0.1-3"},"_resolved":"","_integrity":"","_from":"file:global-modules-path-2.3.1.tgz","_id":"global-modules-path@2.3.1","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"rosen_vladimirov","email":"rosen.vladimirov.91@gmail.com"},"dist":{"shasum":"e541f4c800a1a8514a990477b267ac67525b9931","size":7011,"noattachment":false,"key":"/global-modules-path/-/global-modules-path-2.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/global-modules-path/download/global-modules-path-2.3.1.tgz"},"maintainers":[{"name":"rosen_vladimirov","email":"rosen.vladimirov.91@gmail.com"},{"name":"tsvetie","email":"tsvetelina.e.ivanova@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-modules-path_2.3.1_1543588973433_0.8755167070131311"},"_hasShrinkwrap":false,"publish_time":1543588973583,"_cnpm_publish_time":1543588973583},"2.3.0":{"name":"global-modules-path","version":"2.3.0","description":"Returns path to globally installed package","main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/mocha/bin/_mocha -- --recursive --reporter spec-xunit-file --timeout 1500 test/","lint":"eslint lib/* test/*"},"repository":{"type":"git","url":"git+https://github.com/rosen-vladimirov/global-modules-path.git"},"keywords":["npm","global","installed","path"],"author":{"name":"Telerik","email":"support@telerik.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/rosen-vladimirov/global-modules-path/issues"},"homepage":"https://github.com/rosen-vladimirov/global-modules-path#readme","devDependencies":{"chai":"3.5.0","eslint":"3.8.1","istanbul":"0.4.5","mocha":"3.1.2","spec-xunit-file":"0.0.1-3"},"gitHead":"4a7ec4a0014888c2799036601fffcd4b220f15f0","_id":"global-modules-path@2.3.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"tsvetie","email":"tsvetelina.e.ivanova@gmail.com"},"dist":{"shasum":"b0e2bac6beac39745f7db5c59d26a36a0b94f7dc","size":7062,"noattachment":false,"key":"/global-modules-path/-/global-modules-path-2.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/global-modules-path/download/global-modules-path-2.3.0.tgz"},"maintainers":[{"name":"rosen_vladimirov","email":"rosen.vladimirov.91@gmail.com"},{"name":"tsvetie","email":"tsvetelina.e.ivanova@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-modules-path_2.3.0_1532071245104_0.17346206452017965"},"_hasShrinkwrap":false,"publish_time":1532071245182,"_cnpm_publish_time":1532071245182},"2.2.0":{"name":"global-modules-path","version":"2.2.0","description":"Returns path to globally installed package","main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/mocha/bin/_mocha -- --recursive --reporter spec-xunit-file --timeout 1500 test/","lint":"eslint lib/* test/*"},"repository":{"type":"git","url":"git+https://github.com/rosen-vladimirov/global-modules-path.git"},"keywords":["npm","global","installed","path"],"author":{"name":"Telerik","email":"support@telerik.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/rosen-vladimirov/global-modules-path/issues"},"homepage":"https://github.com/rosen-vladimirov/global-modules-path#readme","devDependencies":{"chai":"3.5.0","eslint":"3.8.1","istanbul":"0.4.5","mocha":"3.1.2","spec-xunit-file":"0.0.1-3"},"gitHead":"6e8176baeb186cbbaf8fb77eae55253dda2fe096","_id":"global-modules-path@2.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"tsvetie","email":"tsvetelina.e.ivanova@gmail.com"},"dist":{"shasum":"24648267c65d02604c5549f04b46ac8973b4ba40","size":7043,"noattachment":false,"key":"/global-modules-path/-/global-modules-path-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/global-modules-path/download/global-modules-path-2.2.0.tgz"},"maintainers":[{"name":"rosen_vladimirov","email":"rosen.vladimirov.91@gmail.com"},{"name":"tsvetie","email":"tsvetelina.e.ivanova@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-modules-path_2.2.0_1531995713135_0.6057581640253065"},"_hasShrinkwrap":false,"publish_time":1531995713258,"_cnpm_publish_time":1531995713258},"2.1.0":{"name":"global-modules-path","version":"2.1.0","description":"Returns path to globally installed package","main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/mocha/bin/_mocha -- --recursive --reporter spec-xunit-file --timeout 1500 test/","lint":"eslint lib/* test/*"},"repository":{"type":"git","url":"git+https://github.com/rosen-vladimirov/global-modules-path.git"},"keywords":["npm","global","installed","path"],"author":{"name":"Telerik","email":"support@telerik.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/rosen-vladimirov/global-modules-path/issues"},"homepage":"https://github.com/rosen-vladimirov/global-modules-path#readme","devDependencies":{"chai":"3.5.0","eslint":"3.8.1","istanbul":"0.4.5","mocha":"3.1.2","spec-xunit-file":"0.0.1-3"},"_id":"global-modules-path@2.1.0","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"rosen-vladimirov","email":"vladimirov@progress.com"},"dist":{"shasum":"923ec524e8726bb0c1a4ed4b8e21e1ff80c88bbb","size":6933,"noattachment":false,"key":"/global-modules-path/-/global-modules-path-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/global-modules-path/download/global-modules-path-2.1.0.tgz"},"maintainers":[{"name":"rosen_vladimirov","email":"rosen.vladimirov.91@gmail.com"},{"name":"tsvetie","email":"tsvetelina.e.ivanova@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-modules-path_2.1.0_1521752630070_0.6965454253115133"},"_hasShrinkwrap":false,"publish_time":1521752630112,"_cnpm_publish_time":1521752630112},"2.0.0":{"name":"global-modules-path","version":"2.0.0","description":"Returns path to globally installed package","main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/mocha/bin/_mocha -- --recursive --reporter spec-xunit-file --timeout 1500 test/","lint":"eslint lib/* test/*"},"repository":{"type":"git","url":"git+https://github.com/rosen-vladimirov/global-modules-path.git"},"keywords":["npm","global","installed","path"],"author":{"name":"Telerik","email":"support@telerik.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/rosen-vladimirov/global-modules-path/issues"},"homepage":"https://github.com/rosen-vladimirov/global-modules-path#readme","devDependencies":{"chai":"3.5.0","eslint":"3.8.1","istanbul":"0.4.5","mocha":"3.1.2","spec-xunit-file":"0.0.1-3"},"_id":"global-modules-path@2.0.0","_shasum":"576d73725d09f35846b5c26d1ac369f19833cb93","_resolved":"file:global-modules-path-2.0.0.tgz","_from":"global-modules-path-2.0.0.tgz","_npmVersion":"3.10.10","_nodeVersion":"6.7.0","_npmUser":{"name":"rosen-vladimirov","email":"rosen.vladimirov.91@gmail.com"},"dist":{"shasum":"576d73725d09f35846b5c26d1ac369f19833cb93","size":6677,"noattachment":false,"key":"/global-modules-path/-/global-modules-path-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/global-modules-path/download/global-modules-path-2.0.0.tgz"},"maintainers":[{"name":"rosen_vladimirov","email":"rosen.vladimirov.91@gmail.com"},{"name":"tsvetie","email":"tsvetelina.e.ivanova@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/global-modules-path-2.0.0.tgz_1498771354937_0.17750889156013727"},"directories":{},"publish_time":1498771355820,"_hasShrinkwrap":false,"_cnpm_publish_time":1498771355820},"1.0.0":{"name":"global-modules-path","version":"1.0.0","description":"Returns path to globally installed package","main":"./lib/index.js","scripts":{"test":"istanbul cover node_modules/mocha/bin/_mocha -- --recursive --reporter spec-xunit-file --timeout 1500 test/","lint":"eslint lib/* test/*"},"repository":{"type":"git","url":"git+https://github.com/rosen-vladimirov/global-modules-path.git"},"keywords":["npm","global","installed","path"],"author":{"name":"Telerik","email":"support@telerik.com"},"license":"Apache-2.0","bugs":{"url":"https://github.com/rosen-vladimirov/global-modules-path/issues"},"homepage":"https://github.com/rosen-vladimirov/global-modules-path#readme","devDependencies":{"chai":"3.5.0","eslint":"3.8.1","istanbul":"0.4.5","mocha":"3.1.2","spec-xunit-file":"0.0.1-3"},"_id":"global-modules-path@1.0.0","_shasum":"af649fe0466bde8f2f27bd48a4b9efa38895e9ea","_resolved":"file:global-modules-path-1.0.0.tgz","_from":"global-modules-path-1.0.0.tgz","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"rosen-vladimirov","email":"rosen.vladimirov.91@gmail.com"},"dist":{"shasum":"af649fe0466bde8f2f27bd48a4b9efa38895e9ea","size":6517,"noattachment":false,"key":"/global-modules-path/-/global-modules-path-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/global-modules-path/download/global-modules-path-1.0.0.tgz"},"maintainers":[{"name":"rosen_vladimirov","email":"rosen.vladimirov.91@gmail.com"},{"name":"tsvetie","email":"tsvetelina.e.ivanova@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/global-modules-path-1.0.0.tgz_1477985365885_0.7530142955947667"},"directories":{},"publish_time":1477985367504,"_cnpm_publish_time":1477985367504,"_hasShrinkwrap":false}},"readme":"# global-modules-path\nReturns path to globally installed package.\n\n## System requirements\nIn order to use this package you need:\n - Node.js 4.0.0 or later\n - npm 2.0.0 or later added to your PATH environment variable (you should be able to execute `npm --version` from your default terminal).\n\n## Usage\nThe module has a single public method called `getPath`. It requires at least one argument - the name of the globally installed package that you need.\nIn case the package is not installed, `getPath` will return null.\n`getPath` will throw error in case the OS is **NOT** supported. Supported OS are:\n - Windows (`process.platform` returns `win32`)\n - macOS (`process.platform` returns `darwin`)\n - Linux (`process.platform` returns `linux`)\n\n### Using getPath with single argument\nExample:\n```\nlet pathToPackage = require(\"global-modules-path\").getPath(\"packageName\");\n```\n\nThe method returns the path to globally installed package or null. The code constructs the path based on the result of `npm config get prefix` and checks if the package exists.\n\n### Using getPath with package name and executable name.\nExample:\n```\nlet pathToPackage = require(\"global-modules-path\").getPath(\"packageName\", \"executableName\");\n```\nThe method returns the path to globally installed package or null. The code constructs the path based on the result of `npm config get prefix` and checks if the package exists. In case the package cannot be found in this way, the `executableName` is used to determine if the package is globally installed.\n- On Windows the package spawns `where executableName` command and parses the result.\n- On macOS and Linux the package spawns `ls -l executableName` and `which executableName` and parses the results.\n\n>NOTE: In some cases the executable name is not the same as the package name.\n","_attachments":{},"homepage":"https://github.com/rosen-vladimirov/global-modules-path#readme","bugs":{"url":"https://github.com/rosen-vladimirov/global-modules-path/issues"},"license":"Apache-2.0"}