Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glynnbird/faviconer
Favicon find utility
https://github.com/glynnbird/faviconer
Last synced: 5 days ago
JSON representation
Favicon find utility
- Host: GitHub
- URL: https://github.com/glynnbird/faviconer
- Owner: glynnbird
- Created: 2022-08-04T10:28:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-21T08:38:09.000Z (about 1 month ago)
- Last Synced: 2024-11-14T05:02:52.589Z (6 days ago)
- Language: HTML
- Size: 399 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# faviconer
**faviconer** is simple Node.js module to extract an icon URL given the URL of a web page.
## Installation
```sh
npm install -g faviconer
```## Usage
```js
const faviconer = require('faviconer')const main = async function() {
const iconURL = await faviconer.get('https://news.bbc.co.uk')
console.log(iconURL)
// https://m.files.bbci.co.uk/modules/bbc-morph-news-waf-page-meta/5.3.0/apple-touch-icon-57x57-precomposed.png
}
main()
```## Return values
Faviconer will return a string containing the absolute URL of the icon it found or `null` if the URL is invalid, or doesn't contain a favicon URL.