faviconic
v0.0.2
Published
๐ Find the logo for any website using just the domain. No dependencies ๐
Downloads
34
Maintainers
Readme
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 to512, 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.
