Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

associated-icon

rvmoldova11MIT1.2.0TypeScript support: included

Given a path, return base64 data of the icon used for that file

icon, extractor, associated, windows, macos, node, nodejs

readme

Associated Icon v1.2.0

Instalation

npm install associated-icon

Supported Platforms

  • Windows
  • MacOS X

Use example

import AssociatedIcon from 'associated-icon';

async function main() {
    let associatedIcon = new AssociatedIcon(); // or new AssociatedIcon(true); (this will use execFile instead of spawn, so this will work in electron)
    let response = await associatedIcon.getBase64Icon('[PATH_TO_APPLICATION_OR_SHORTCUT]');
    response.Base64Image // App icon in base64
    response.Path // if it's shortcut, here will be original exe's path
}

main();

changelog

Changelog

1.2.0 - 2017-11-06

  • Changed response.Base64Image -> response.Base64Data

1.1.3 - 2017-10-30

Removed

  • Removed promisify to work on older node versions

1.1.2 - 2017-10-30

Added

  • Added option execFile to contructor (this will use execFile instead of spawn, so this will work in electron)

1.1.1 - 2017-10-27

Changed

  • Targeted .NET Framework 4.0

1.1.0 - 2017-10-26

Added

  • Support associated-icon for MacOS

1.0.1 - 2017-10-25

Initial Release