# favicon-downloader

> A module to download favicon of any site

Latest version **1.0.0** (published 2019-06-27) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-06-27 |
| First published | 2019-06-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 96.3 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Anubhav Srivastava |
| Maintainers | theanubhav |

## Links

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

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^0.19.0
- [make-dir](https://npm.io/package/make-dir.md) ^3.0.0
- [favicongrab](https://npm.io/package/favicongrab.md) ^1.0.0

## Recent versions

- 1.0.0 (latest) — 2019-06-27
- 0.0.3 — 2019-06-27
- 0.0.2 — 2019-06-06

## README

# favicon-downloader

> A module to download favicon of any site

[![Build Status](https://travis-ci.org/anubhavsrivastava/favicon-downloader.svg?branch=master)](https://travis-ci.org/anubhavsrivastava/favicon-downloader)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![GitHub issues](https://img.shields.io/github/issues/anubhavsrivastava/favicon-downloader.svg?style=flat-square)](https://github.com/anubhavsrivastava/favicon-downloader/issues)
[![HitCount](http://hits.dwyl.io/anubhavsrivastava/favicon-downloader.svg)](http://hits.dwyl.io/anubhavsrivastava/favicon-downloader)

[![NPM](https://nodei.co/npm/favicon-downloader.png?downloads=true&stars=true)](https://nodei.co/npm/favicon-downloader/)

## Install

```
$ npm install favicon-downloader
```

## Usage

```javascript
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`](https://github.com/anubhavsrivastava/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`<br>
Required:true

URL of the site whose favicon has to be downloaded

#### options?

Type: `object`

##### name

Type: `string`<br>
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`<br>
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

-   [favicon-downloader-cli](https://github.com/anubhavsrivastava/favicon-downloader-cli) CLI for this module
-   [favicongrab](https://github.com/anubhavsrivastava/favicongrab) A module for fetching Favicon of any web site.

### Contribution

Suggestions and PRs are welcome!

Please create issue or open PR request for contribution.

### License

[![Open Source Love](https://badges.frapsoft.com/os/mit/mit.svg?v=102)](LICENSE)

refer `LICENSE` file in this repository.

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