# bundle-id

> Get bundle identifier from a bundle name (macOS): `Safari` → `com.apple.Safari`

Latest version **3.0.0** (published 2021-08-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install bundle-id
pnpm add bundle-id
yarn add bundle-id
bun add bundle-id
```

## Health

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

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2021-08-09 |
| First published | 2014-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/bundle-id) |
| Module format | ESM |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 1 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | macos, plist, applescript, bundle, bundleid, bundlename, id, identifier, CFBundleName, CFBundleIdentifier, uti |

## Links

- npm: https://www.npmjs.com/package/bundle-id
- Repository: https://github.com/sindresorhus/bundle-id
- Homepage: https://github.com/sindresorhus/bundle-id#readme
- Issues: https://github.com/sindresorhus/bundle-id/issues
- npm.io page: https://npm.io/package/bundle-id

## Dependencies (1)

- [run-applescript](https://npm.io/package/run-applescript.md) ^5.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2021-08-09
- 2.1.0 — 2017-12-30
- 2.0.1 — 2016-06-14
- 2.0.0 — 2015-10-08
- 1.0.2 — 2014-08-18
- 1.0.1 — 2014-08-18
- 1.0.0 — 2014-08-13
- 0.1.0 — 2014-02-08

## README

# bundle-id

> Get [bundle identifier](https://developer.apple.com/library/Mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/plist/info/CFBundleIdentifier) from a [bundle name](https://developer.apple.com/library/Mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/plist/info/CFBundleName) (macOS): `Safari` → `com.apple.Safari`

## Install

```
$ npm install bundle-id
```

## Usage

```js
import {bundleId} from 'bundle-id';

console.log(await bundleId('Safari'));
//=> 'com.apple.Safari'
```

## API

### bundleId()

Returns a `Promise<string>` with the bundle ID.

### bundleIdSync()

Returns a `string` with the bundle ID.

## Related

- [bundle-id-cli](https://github.com/sindresorhus/bundle-id-cli) - CLI for this module
- [bundle-name](https://github.com/sindresorhus/bundle-name) - Get bundle name from a bundle identifier

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