This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

favicon-generator
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

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

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.

Readme

Keywords

Package Sidebar

Install

npm i favicon-generator

Weekly Downloads

1

Version

0.1.2

License

MIT

Unpacked Size

39.5 kB

Total Files

8

Last publish

Collaborators

  • ym-project