# node-mac-app-icon

> Get App icons by pid on macOS in NodeJS

Latest version **1.4.0** (published 2018-01-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-mac-app-icon
pnpm add node-mac-app-icon
yarn add node-mac-app-icon
bun add node-mac-app-icon
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2018-01-10 |
| First published | 2017-12-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | sallar |

## Links

- npm: https://www.npmjs.com/package/node-mac-app-icon
- Repository: https://github.com/sallar/node-mac-app-icon
- Homepage: https://github.com/sallar/node-mac-app-icon#readme
- Issues: https://github.com/sallar/node-mac-app-icon/issues
- npm.io page: https://npm.io/package/node-mac-app-icon

## Dependencies (2)

- [execa](https://npm.io/package/execa.md) ^0.8.0
- [electron-util](https://npm.io/package/electron-util.md) ^0.4.1

## Recent versions

- 1.4.0 (latest) — 2018-01-10
- 1.3.0 — 2018-01-10
- 1.2.2 — 2018-01-08
- 1.2.1 — 2018-01-01
- 1.1.0 — 2017-12-29
- 1.0.1 — 2017-12-27
- 1.0.0 — 2017-12-22

## README

# node-mac-app-icon

[![Build Status](https://travis-ci.org/sallar/node-mac-app-icon.svg?branch=master)](https://travis-ci.org/sallar/node-mac-app-icon)

Get App icons by pid on macOS in NodeJS. Returns a `Buffer` representation of the App's icon data.

The node source uses a [Swift](https://github.com/sallar/GetAppIcon) binary to fetch the icons so it's pretty fast.

Returning a `Buffer` is inspired by [sindresorhus/file-icon](https://github.com/sindresorhus/file-icon).

## Install

```sh
$ npm install node-mac-app-icon --save
```

## Usage

```js
const { getAppIconByPid, getAppIconListByPid } = require('node-mac-app-icon');

getAppIconByPid(814, { size: 32 }).then(res => {
  console.log(res); // res is a Buffer
});

getAppIconListByPid([814, 20134, 503], { size: 512 }).then(res => {
  console.log(res); // array of { pid: ..., icon: ... }
});
```

## License

This software is licensed under the [MIT License](LICENSE)

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