node-mac-app-icon
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

node-mac-app-icon

Build Status

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 binary to fetch the icons so it's pretty fast.

Returning a Buffer is inspired by sindresorhus/file-icon.

Install

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

Usage

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

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i node-mac-app-icon

    Weekly Downloads

    11

    Version

    1.4.0

    License

    MIT

    Last publish

    Collaborators

    • sallar