2.1.1 • Published 2 months ago

@victr/favicon-fetcher v2.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

favicon fetcher

Favicon fetcher finds sites favicons and fetches them fast

Install

npm i @victr/favicon-fetcher

Example use

import favicon from '@victr/favicon-fetcher'

window.onload = async function () {
  const img = document.getElementById('some-id')
  const url = await favicon.url('https://github.com')

  img.src = url
}

Export type

export default {
  url: (query: string) => Promise<string>,
  img: (query: string) => Promise<Blob>,
}

As API

Endpoints

Protocols need to be included in the :url query. You can get your favicon as a plaintext url or a blob:

GET /text/:url
GET /blob/:url

Cloudflare Workers

# install
pnpm i -r
pnpm install
pnpm cloudflare:install

# debug
pnpm dev
pnpm cloudflare:dev
2.1.1

2 months ago

2.1.0

4 months ago

2.0.1

5 months ago

2.0.0

5 months ago

1.2.0

7 months ago

1.1.0

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago