# npm-normalize-package-bin

> Turn any flavor of allowable package.json bin into a normalized object

Latest version **6.0.0** (published 2026-05-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install npm-normalize-package-bin
pnpm add npm-normalize-package-bin
yarn add npm-normalize-package-bin
bun add npm-normalize-package-bin
```

## Health

**Score 50/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance.

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

## Facts

| | |
|---|---|
| Version | 6.0.0 |
| Published | 2026-05-08 |
| First published | 2019-12-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^22.22.2 \|\| ^24.15.0 \|\| >=26.0.0 |
| Dependencies | 0 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 7 |
| Author | GitHub Inc. |
| Maintainers | saquibkhan, npm-cli-ops, reggi, owlstronaut |

## Links

- npm: https://www.npmjs.com/package/npm-normalize-package-bin
- Repository: https://github.com/npm/npm-normalize-package-bin
- Homepage: https://github.com/npm/npm-normalize-package-bin#readme
- Issues: https://github.com/npm/npm-normalize-package-bin/issues
- npm.io page: https://npm.io/package/npm-normalize-package-bin

## Recent versions

- 6.0.0 (latest) — 2026-05-08
- 5.0.0 — 2025-10-22
- 4.0.0 — 2024-09-05
- 3.0.1 — 2023-05-02
- 3.0.0 — 2022-10-14
- 2.0.0 — 2022-08-22
- 1.0.1 — 2019-12-09
- 1.0.0 — 2019-12-09

## README

# npm-normalize-package-bin

Turn any flavor of allowable package.json bin into a normalized object.

## API

```js
const normalize = require('npm-normalize-package-bin')
const pkg = {name: 'foo', bin: 'bar'}
console.log(normalize(pkg)) // {name:'foo', bin:{foo: 'bar'}}
```

Also strips out weird dots and slashes to prevent accidental and/or
malicious bad behavior when the package is installed.

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