Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/xnerhu/electron-ext-icon
- Owner: xnerhu
- License: mit
- Created: 2019-05-18T19:45:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-18T20:48:03.000Z (over 5 years ago)
- Last Synced: 2024-09-15T23:53:26.085Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 30.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.