{"_id":"which-promise","_rev":"303878","name":"which-promise","description":"Promisified version of node-which","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"time":{"modified":"2021-06-03T19:25:00.000Z","created":"2015-10-07T13:59:58.733Z","1.0.0":"2015-10-09T08:19:35.989Z","0.0.0":"2015-10-07T13:59:58.733Z"},"users":{},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"git+https://github.com/shinnn/which-promise.git"},"versions":{"1.0.0":{"name":"which-promise","version":"1.0.0","description":"Promisified version of node-which","repository":{"type":"git","url":"git+https://github.com/shinnn/which-promise.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint --config @shinnn/node index.js test.js","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js","coverage":"node --strong_mode node_modules/.bin/istanbul cover test.js"},"license":"MIT","files":["index.js"],"keywords":["which","bin","binary","path","executable","resolve","find","check"],"dependencies":{"pify":"^2.2.0","pinkie-promise":"^1.0.0","which":"^1.1.2"},"devDependencies":{"@shinnn/eslint-config-node":"^1.0.1","eslint":"^1.6.0","istanbul":"^0.3.22","tape":"^4.2.1"},"gitHead":"2346d46a2e242c1b238829f7cca744ebd3d7ff96","bugs":{"url":"https://github.com/shinnn/which-promise/issues"},"homepage":"https://github.com/shinnn/which-promise#readme","_id":"which-promise@1.0.0","_shasum":"20b721df05b35b706176ffa10b0909aba4603035","_from":".","_npmVersion":"2.14.6","_nodeVersion":"4.1.2","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"20b721df05b35b706176ffa10b0909aba4603035","size":2071,"noattachment":false,"key":"/which-promise/-/which-promise-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/which-promise/download/which-promise-1.0.0.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"directories":{},"publish_time":1444378775989,"_cnpm_publish_time":1444378775989,"_hasShrinkwrap":false},"0.0.0":{"name":"which-promise","version":"0.0.0","description":"Check if a module ID is resolvable with require()","repository":{"type":"git","url":"git+https://github.com/shinnn/which-promise.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint --config @shinnn/node index.js test.js","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js","coverage":"node --strong_mode node_modules/.bin/istanbul cover test.js"},"license":"MIT","files":["index.js"],"keywords":["which","bin","binary","path","executable","resolve","find","check"],"dependencies":{"pify":"^2.2.0","pinkie-promise":"^1.0.0","which":"^1.1.2"},"devDependencies":{"@shinnn/eslint-config-node":"^1.0.1","eslint":"^1.6.0","istanbul":"^0.3.22","tape":"^4.2.1"},"bugs":{"url":"https://github.com/shinnn/which-promise/issues"},"homepage":"https://github.com/shinnn/which-promise#readme","_id":"which-promise@0.0.0","_shasum":"9e198624d7cb81efd99ee4a1a361e5bfd9ec6034","_from":".","_npmVersion":"2.14.6","_nodeVersion":"4.1.2","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"9e198624d7cb81efd99ee4a1a361e5bfd9ec6034","size":2056,"noattachment":false,"key":"/which-promise/-/which-promise-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/which-promise/download/which-promise-0.0.0.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"directories":{},"publish_time":1444226398733,"_cnpm_publish_time":1444226398733,"_hasShrinkwrap":false}},"readme":"# which-promise\n\n[![NPM version](https://img.shields.io/npm/v/which-promise.svg)](https://www.npmjs.com/package/which-promise)\n[![Build Status](https://travis-ci.org/shinnn/which-promise.svg?branch=master)](https://travis-ci.org/shinnn/which-promise)\n[![Build status](https://ci.appveyor.com/api/projects/status/rru70vrrm83s9ddj?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/which-promise)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/which-promise.svg)](https://coveralls.io/r/shinnn/which-promise)\n[![Dependency Status](https://img.shields.io/david/shinnn/which-promise.svg?label=deps)](https://david-dm.org/shinnn/which-promise)\n[![devDependency Status](https://img.shields.io/david/dev/shinnn/which-promise.svg?label=devDeps)](https://david-dm.org/shinnn/which-promise#info=devDependencies)\n\n[Promisified](https://promise-nuggets.github.io/articles/07-wrapping-callback-functions.html) version of [node-which](https://github.com/npm/node-which):\n\n> Finds the first instance of a specified executable in the PATH environment variable.\n\n```javascript\nconst whichPromise = require('which-promise');\n\nwhichPromise('ls').then(resolvedPath => {\n  resolvedPath; //=> '/bin/ls'\n});\n\nwhichPromise('ls', {path: './'}).catch(err => {\n  err.message; //=> 'not found: ls'\n});\n```\n\n## Installation\n\n[Use npm.](https://docs.npmjs.com/cli/install)\n\n```\nnpm install which-promise\n```\n\n## API\n\n```javascript\nconst whichPromise = require('which-promise');\n```\n\n### whichPromise(*cmd* [, *options*])\n\n*cmd*: `String` (directly passed to node-which's first argument)  \n*options*: `Object` (used as node-which [options](https://github.com/npm/node-which/blob/5d832a3d32b21a7f110771a3c14d5e8ee90d6706/which.js#L40))  \nReturn: `Object` ([Promise](https://promisesaplus.com/))\n\n## License\n\n[The Unlicense](./LICENSE)\n","_attachments":{},"homepage":"https://github.com/shinnn/which-promise#readme","bugs":{"url":"https://github.com/shinnn/which-promise/issues"},"license":"MIT"}