1.0.7 • Published 9 years ago

favitest v1.0.7

Weekly downloads
3
License
GPLv3
Repository
github
Last release
9 years ago

node-favitest

Returns a fully resolved Favicon URL from any URL and URI Schema.

Falls through from parsed HTML headers, then HTTP response headers, then default /favicon.ico. When a URL has been derived, it is confirmed with a HTTP HEAD request after following any redirects. When all else fails, does same for explicit domain name.

Callback produces an error, resolved URL, file suffix, mime type and domain name

Enjoy.

Installation

npm install favitest

Usage

var favitest = require('favitest');

favitest(
  'https://github.com/bipio-server/node-favitest',
  function(err, url, suffix, mime, domain) {
    console.log(arguments);
  }
);

Will produce :

{
  '0': false,
  '1': 'https://assets-cdn.github.com/favicon.ico',
  '2': '.ico',
  '3': 'image/x-icon',
  '4': 'github.com'
}

License

GPLv3

Copyright (c) 2014-2015 WoT.IO inc

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago