Skip to content

joshsny/faviconic

Repository files navigation

Logo

Faviconic

Get any logo from a domain.


Get Started · Report Bug

Favicon gets icons for any domain name.

Getting Started

To start using Faviconic install it using npm or yarn.

yarn add faviconic

or

npm install faviconic --save

How to use Faviconic

Faviconic is very simple to use. Just import the getIcon function and you are good to go.

import { getIcon } from "faviconic"

const { url } = getIcon("yahoo.com"); // just the domain

const { url } = getIcon("https://yahoo.com") // with the protocol

const { url, size } = getIcon("yahoo.com") // with icon size

// size: { width: 512, height: 512 }

Configuration

When using getIcon the following options are available:

  • targetSize: If multiple icons are found, the icon closest to this size will be selected. Defaults to 512, value is in pixels.

Here is an example with the default value for each option:

const { url } = getIcon("yahoo.com", {
  targetSize: 512
})

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Joshua Snyder - @joshsny - LinkedIn

About

🔍 Find the logo for any website using just the domain. No dependencies!

Resources

License

Stars

Watchers

Forks

Packages

No packages published