Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xnerhu/electron-ext-icon

Get icon associated with file extension.
https://github.com/xnerhu/electron-ext-icon

Last synced: about 2 months ago
JSON representation

Get icon associated with file extension.

Awesome Lists containing this project

README

        

# electron-ext-icon

[![NPM](https://img.shields.io/npm/v/electron-ext-icon.svg?style=flat-square)](https://www.npmjs.com/package/electron-ext-icon)

Get icon associated with file extension.

## Installing

```bash
$ npm install electron-ext-icon
```

## API

- `getExtIcon(ext: string, options?: Electron.FileIconOptions): Promise`

```ts
// Electron main
import { writeFileSync } from 'fs';
import { getExtIcon } from 'electron-ext-icon';

const icon = await getExtIcon('html', { size: 'normal' });

icon.toDataURL(); // Base64
```

## Related

- [Qusly](https://www.github.com/xnerhu/qusly) - An FTP/SFTP client with Material Design UI.