# favicon-generator

> favicon generator

Latest version **0.1.2** (published 2021-03-24) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install favicon-generator
pnpm add favicon-generator
yarn add favicon-generator
bun add favicon-generator
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2021-03-24 |
| First published | 2021-03-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 38.5 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| Author | ym-project |
| Maintainers | ym-project |
| Keywords | favicon |

## Links

- npm: https://www.npmjs.com/package/favicon-generator
- Repository: https://github.com/ym-project/favicon-generator
- Homepage: https://github.com/ym-project/favicon-generator#readme
- Issues: https://github.com/ym-project/favicon-generator/issues
- npm.io page: https://npm.io/package/favicon-generator

## Dependencies (2)

- [jimp](https://npm.io/package/jimp.md) ^0.16.1
- [sharp](https://npm.io/package/sharp.md) ^0.27.2

## Recent versions

- 0.1.2 (latest) — 2021-03-24
- 0.1.1 — 2021-03-23
- 0.1.0 — 2021-03-14

## README

# favicon generator

NodeJS library for favicon generation.

Supported input file formats: `JPEG`, `PNG`, `WebP`, `AVIF`, `TIFF`, `GIF`, `SVG`

Supported output file formats: `JPEG`, `PNG`, `WebP`, `AVIF`, `TIFF`, `ICO`

## Example
```js
const {faviconGenerator} = require('favicon-generator')
const fs = require('fs/promises')

faviconGenerator('./favicon.png', [
    {
        width: 64,
        format: 'png',
    },
    {
        width: 192,
        height: 192,
    }
]).then(async favicons => {
    /*
    favicons [
        0: {
            width: 64,
            height: 64,
            format: 'png',
            buffer: Buffer,
        },
        1: {
            width: 192,
            height: 192,
            format: 'png',
            buffer: Buffer,
        },
    ]
    */

    await fs.writeFile('./favicon1.png', favicons[0].buffer)
    await fs.writeFile('./favicon2.png', favicons[1].buffer)
})
```

## Arguments
You can find arguments list in [declaration file](https://github.com/ym-project/favicon-generator/blob/master/index.d.ts).

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