1.0.0 • Published 5 years ago

favicon-downloader v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

favicon-downloader

A module to download favicon of any site

Build Status PRs Welcome GitHub issues HitCount

NPM

Install

$ npm install favicon-downloader

Usage

const { downloadIcons } = require('favicon-downloader');

(async () => {
	//downloads favicon set for specified URL
	// By default downloads the icon to cwd
	await downloadIcons('https://theanubhav.com');

	// Specify name to downloaded icon
	await downloadIcons('https://devtips.theanubhav.com', { name: 'devtips.ico' });

	// Specify path to downloaded icons
	await downloadIcons('https://about.theanubhav.com', { path: '/icons/about' });
})();

API

It uses the command favicongrab module to fetch the favicon and downloads them via axios

downloadIcons(URL, options?)

Returns a promise for download action. Downloads all available favicons for the site.

URL

Type: string Required:true

URL of the site whose favicon has to be downloaded

options?

Type: object

name

Type: string Default: (empty)

Name of the favicon file that will be downloaded. By Default it is filename that is mentioned in the target site.

path

Type: string Default: (empty) (current working directory)

Directory path where the favicons has to be downloaded. By default this is current working directory. If the path does not exists, directory is created.

Related Module

Contribution

Suggestions and PRs are welcome!

Please create issue or open PR request for contribution.

License

Open Source Love

refer LICENSE file in this repository.

1.0.0

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago