# favicongrab

> A module for grabbing Favicon info from favicongrabber.com API

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

## Install

```sh
npm install favicongrab
pnpm add favicongrab
yarn add favicongrab
bun add favicongrab
```

## 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-05 |
| First published | 2019-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 38.8 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Anubhav Srivastava |
| Maintainers | theanubhav |

## Links

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

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.19.0
- [axios-data-unpacker](https://npm.io/package/axios-data-unpacker.md) ^1.0.0

## Recent versions

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

## README

# favicongrab

A module for grabbing Favicon for any web site

[![Build Status](https://travis-ci.org/anubhavsrivastava/favicongrab.svg?branch=master)](https://travis-ci.org/anubhavsrivastava/favicongrab)
[![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/favicongrab.svg?style=flat-square)](https://github.com/anubhavsrivastava/favicongrab/issues)
[![HitCount](http://hits.dwyl.io/anubhavsrivastava/favicongrab.svg)](http://hits.dwyl.io/anubhavsrivastava/favicongrab)

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

### Install

```
$ npm install favicongrab --save
```

or

```
yarn add favicongrab
```

### Usage

    const { grabFavicon } = require('favicongrab');

    grabFavicon('https://about.theanubhav.com').then((response)=>{console.log(response)})

Above call returns following `response`

    { domain: 'about.theanubhav.com',
      icons: [ {
          src: 'https://about.theanubhav.com/favicon.ico',
        type: 'image/x-icon'
        } ]
    }

### API Specification

#### `grabFavicon`

-   returns - Promise
-   arguments - siteUrl // e.g theanubhav.com

-   Result Data

1.  Success :

        { domain: 'about.theanubhav.com',
            icons: [ {
                src: 'https://about.theanubhav.com/favicon.ico',
                type: 'image/x-icon'
            } ]
        }

Description properties of icon object:

-   property src contains an absolute URL for a favicon image and is required and unique;
-   property type equals an [MIME-type](https://en.wikipedia.org/wiki/Media_type)'s favicon image;
-   property sizes contains size's favicon image and in a simple case has the following format: HEIGHTxWIDTH in pixels.

2. Failure :

All error messages have the following format

    {
        "error": "Unresolved domain name."
    }

### Reference

`favicongrab` uses HTTP API from [favicongrabber](favicongrabber.com). Refer service API reference [here](https://favicongrabber.com/service-api-reference).

### Environment

Currently, `favicongrab` is supported for Nodejs Environment only. Please open a issue for browser support, if required.

### 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/favicongrab · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
