{"_id":"command-exists-promise","_rev":"2773546","name":"command-exists-promise","description":"Checks whether a command line command exists in the current environment.","dist-tags":{"latest":"2.0.2"},"maintainers":[{"name":"raftario","email":"raphael_theriault@outlook.com"}],"time":{"modified":"2022-06-06T08:08:28.000Z","created":"2019-05-09T20:11:14.942Z","2.0.2":"2019-05-09T21:48:13.782Z","2.0.1":"2019-05-09T20:24:25.675Z","2.0.0":"2019-05-09T20:11:14.942Z"},"users":{},"author":{"name":"Raphaël Thériault","email":"raphael_theriault@outlook.com","url":"https://raphaeltheriault.com"},"repository":{"type":"git","url":"https://github.com/raftario/command-exists.git"},"versions":{"2.0.2":{"name":"command-exists-promise","version":"2.0.2","description":"Checks whether a command line command exists in the current environment.","main":"lib/index.js","scripts":{"test":"mocha test/test.js"},"repository":{"type":"git","url":"https://github.com/raftario/command-exists.git"},"keywords":["cli","command","exists","promise","async"],"author":{"name":"Raphaël Thériault","email":"raphael_theriault@outlook.com","url":"https://raphaeltheriault.com"},"contributors":[{"name":"Matthew Conlen"},{"name":"Arthur Silber","email":"arthur@arthursilber.de","url":"https://arthursilber.de"}],"license":"MIT","homepage":"https://github.com/raftario/command-exists","engines":{"node":">=6"},"devDependencies":{"expect.js":"^0.3.1","mocha":"^6.1.4"},"dependencies":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2019 Raphaël Thériault\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"command-exists-promise@2.0.2","dist":{"shasum":"7beecc4b218299f3c61fa69a4047aa0b36a64a99","size":2392,"noattachment":false,"key":"/command-exists-promise/-/command-exists-promise-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/command-exists-promise/download/command-exists-promise-2.0.2.tgz"},"maintainers":[{"name":"raftario","email":"raphael_theriault@outlook.com"}],"_npmUser":{"name":"raftario","email":"raphael_theriault@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/command-exists-promise_2.0.2_1557438493649_0.31890973519935595"},"_hasShrinkwrap":false,"publish_time":1557438493782,"_cnpm_publish_time":1557438493782,"_cnpmcore_publish_time":"2021-12-16T13:07:46.122Z"},"2.0.1":{"name":"command-exists-promise","version":"2.0.1","description":"Checks whether a command line command exists in the current environment.","main":"lib/index.js","scripts":{"test":"mocha test/test.js"},"repository":{"type":"git","url":"https://github.com/raftario/command-exists.git"},"keywords":["cli","command","exists","promise","async"],"author":{"name":"Raphaël Thériault","email":"raphael_theriault@outlook.com","url":"https://raphaeltheriault.com"},"contributors":[{"name":"Matthew Conlen"},{"name":"Arthur Silber","email":"arthur@arthursilber.de","url":"https://arthursilber.de"}],"license":"MIT","homepage":"https://github.com/raftario/command-exists","devDependencies":{"expect.js":"^0.3.1","mocha":"^6.1.4"},"dependencies":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2019 Raphaël Thériault\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"command-exists-promise@2.0.1","dist":{"shasum":"edd854bf26c6dcf1e6b73975dc86badfc888c6cb","size":2375,"noattachment":false,"key":"/command-exists-promise/-/command-exists-promise-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/command-exists-promise/download/command-exists-promise-2.0.1.tgz"},"maintainers":[{"name":"raftario","email":"raphael_theriault@outlook.com"}],"_npmUser":{"name":"raftario","email":"raphael_theriault@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/command-exists-promise_2.0.1_1557433465573_0.5036693273263038"},"_hasShrinkwrap":false,"publish_time":1557433465675,"_cnpm_publish_time":1557433465675,"_cnpmcore_publish_time":"2021-12-16T13:07:46.378Z"},"2.0.0":{"name":"command-exists-promise","version":"2.0.0","description":"Checks whether a command line command exists in the current environment.","main":"lib/index.js","scripts":{"test":"mocha test/test.js"},"repository":{"type":"git","url":"https://github.com/raftario/command-exists.git"},"keywords":["cli","command","exists"],"author":{"name":"Raphaël Thériault","email":"raphael_theriault@outlook.com","url":"https://raphaeltheriault.com"},"contributors":[{"name":"Matthew Conlen"},{"name":"Arthur Silber","email":"arthur@arthursilber.de","url":"https://arthursilber.de"}],"license":"MIT","homepage":"https://github.com/raftario/command-exists","devDependencies":{"expect.js":"^0.3.1","mocha":"^6.1.4"},"dependencies":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2019 Raphaël Thériault\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"command-exists-promise@2.0.0","dist":{"shasum":"04d69f4540af21e174964679e1cdfa7739c8b85a","size":2279,"noattachment":false,"key":"/command-exists-promise/-/command-exists-promise-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/command-exists-promise/download/command-exists-promise-2.0.0.tgz"},"maintainers":[{"name":"raftario","email":"raphael_theriault@outlook.com"}],"_npmUser":{"name":"raftario","email":"raphael_theriault@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/command-exists-promise_2.0.0_1557432674295_0.5371051283315773"},"_hasShrinkwrap":false,"publish_time":1557432674942,"_cnpm_publish_time":1557432674942,"_cnpmcore_publish_time":"2021-12-16T13:07:46.676Z"}},"readme":"# command-exists-promise\n![npm](https://img.shields.io/npm/v/command-exists-promise.svg) ![Travis (.com)](https://img.shields.io/travis/com/raftario/command-exists.svg?label=travis+build) ![AppVeyor](https://img.shields.io/appveyor/ci/raftario/command-exists.svg?label=appveyor+build)  \nNode module to check if a command-line command exists.\nForked from [command-exists](https://github.com/mathisonian/command-exists).\n## Installation\n```console\n# For npm users\n$ npm i command-exists-promise\n\n# For yarn users\n$ yarn add command-exists-promise\n```\n## Usage\nThe function returns a promise that will resolve to `true` if the command exists and `false` if it doesn't.  \nOn UNIX, the promise will resolve to `true` if the command is a path to an executable file. On Windows, it will resolve to `true` for any existing file.\n### Promise\n```js\nconst commandExists = require('command-exists-promise')\n\ncommandExists('ls')\n  .then(exists => {\n    if (exists) {\n      // The command exists\n    } else {\n      // The command doesn't exist\n    }\n  })\n  .catch(err => {\n    // Should never happen but better handle it just in case\n  })\n```\n### Await\n```js\nconst commandExists = require('command-exists-promise')\n\ntry {\n  const exists = await commandExists('ls')\n  if (exists) {\n    // The command exists\n  } else {\n    // The command doesn't exist\n  }\n} catch (err) {\n  // Should never happen but better handle it just in case\n}\n```\n","_attachments":{},"homepage":"https://github.com/raftario/command-exists","license":"MIT"}