# resolve-as-bin

> Resolve a local npm package as binary path

Latest version **2.1.0** (published 2019-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install resolve-as-bin
pnpm add resolve-as-bin
yarn add resolve-as-bin
bun add resolve-as-bin
```

## 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 | 2.1.0 |
| Published | 2019-07-16 |
| First published | 2018-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Yoshihide Shiono |
| Maintainers | saltyshiomix |
| Keywords | bin, path, npm, resolve-as-bin |

## Links

- npm: https://www.npmjs.com/package/resolve-as-bin
- Repository: https://github.com/saltyshiomix/resolve-as-bin
- Issues: https://github.com/saltyshiomix/resolve-as-bin/issues
- npm.io page: https://npm.io/package/resolve-as-bin

## Dependencies (1)

- [cross-spawn](https://npm.io/package/cross-spawn.md) ^6.0.5

## 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

- 2.1.0 (latest) — 2019-07-16
- 2.0.0 — 2019-07-16
- 1.4.0 — 2019-07-16
- 1.3.0 — 2018-07-30
- 1.2.0 — 2018-07-27
- 1.1.0 — 2018-07-27
- 1.0.1 — 2018-07-26
- 1.0.0 — 2018-07-26

## README

<p align="center">
  <a href="https://www.npmjs.com/package/resolve-as-bin"><img src="https://img.shields.io/npm/v/resolve-as-bin.svg"></a>
  <a href="https://www.npmjs.com/package/resolve-as-bin"><img src="https://img.shields.io/npm/dt/resolve-as-bin.svg"></a>
</p>
<p align="center">Resolve a local npm package as the absolute binary path</p>

## Install

```bash
$ npm install --save resolve-as-bin
```

## Usage

```js
import resolve from 'resolve-as-bin';

// npm installed package
console.log(resolve('rimraf')); // "/absolute/path/to/node_modules/.bin/rimraf(.cmd)"

// relative or absolute paths are supported
console.log(resolve('./some-binary')); // "/absolute/path/to/some-binary(.cmd)"
console.log(resolve('/absolute/path/another-binary')); // "/absolute/path/another-binary(.cmd)"
```

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