0.1.2 • Published 3 years ago

favicon-generator v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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.

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

1.1.4

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago