# which-promise

> Promisified version of node-which

Latest version **1.0.0** (published 2015-10-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install which-promise
pnpm add which-promise
yarn add which-promise
bun add which-promise
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-10-09 |
| First published | 2015-10-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shinnosuke Watanabe |
| Maintainers | shinnn |
| Keywords | which, bin, binary, path, executable, resolve, find, check |

## Links

- npm: https://www.npmjs.com/package/which-promise
- Repository: https://github.com/shinnn/which-promise
- Homepage: https://github.com/shinnn/which-promise#readme
- Issues: https://github.com/shinnn/which-promise/issues
- npm.io page: https://npm.io/package/which-promise

## Dependencies (3)

- [pify](https://npm.io/package/pify.md) ^2.2.0
- [which](https://npm.io/package/which.md) ^1.1.2
- [pinkie-promise](https://npm.io/package/pinkie-promise.md) ^1.0.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-10-09
- 0.0.0 — 2015-10-07

## README

# which-promise

[![NPM version](https://img.shields.io/npm/v/which-promise.svg)](https://www.npmjs.com/package/which-promise)
[![Build Status](https://travis-ci.org/shinnn/which-promise.svg?branch=master)](https://travis-ci.org/shinnn/which-promise)
[![Build status](https://ci.appveyor.com/api/projects/status/rru70vrrm83s9ddj?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/which-promise)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/which-promise.svg)](https://coveralls.io/r/shinnn/which-promise)
[![Dependency Status](https://img.shields.io/david/shinnn/which-promise.svg?label=deps)](https://david-dm.org/shinnn/which-promise)
[![devDependency Status](https://img.shields.io/david/dev/shinnn/which-promise.svg?label=devDeps)](https://david-dm.org/shinnn/which-promise#info=devDependencies)

[Promisified](https://promise-nuggets.github.io/articles/07-wrapping-callback-functions.html) version of [node-which](https://github.com/npm/node-which):

> Finds the first instance of a specified executable in the PATH environment variable.

```javascript
const whichPromise = require('which-promise');

whichPromise('ls').then(resolvedPath => {
  resolvedPath; //=> '/bin/ls'
});

whichPromise('ls', {path: './'}).catch(err => {
  err.message; //=> 'not found: ls'
});
```

## Installation

[Use npm.](https://docs.npmjs.com/cli/install)

```
npm install which-promise
```

## API

```javascript
const whichPromise = require('which-promise');
```

### whichPromise(*cmd* [, *options*])

*cmd*: `String` (directly passed to node-which's first argument)  
*options*: `Object` (used as node-which [options](https://github.com/npm/node-which/blob/5d832a3d32b21a7f110771a3c14d5e8ee90d6706/which.js#L40))  
Return: `Object` ([Promise](https://promisesaplus.com/))

## License

[The Unlicense](./LICENSE)

---
_Source: https://npm.io/package/which-promise · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
