1.4.2 • Published 6 years ago
@davej/page-icon v1.4.2
Page Icon
A library to find the highest resolution website logo for a given url.
This a Javascript implementation of http://stackoverflow.com/a/22007642/5076225.
Installation
Only supported on Node.js >=v4.2 because of promise support.
If support is desired for earlier versions, a global promise polyfill is required.
$ npm install --save page-icon
Usage
const pageIcon = require('page-icon');
const URL = 'https://www.facebook.com/';
pageIcon(siteUrl)
.then(function(icon) {
// do things with icon object
console.log(icon);
})
.catch(error => {
console.error(error);
});
});
Example Icon Object
{
source: 'https://www.facebook.com/apple-touch-icon.png',
name: 'www.facebook.com',
data: <Buffer 89 50 4e ... >,
size: 1779,
ext: '.png',
mime: 'image/png'
}
Tests
$ npm test
License
MIT
1.4.2
6 years ago
1.4.1
6 years ago
1.4.0
6 years ago
1.3.0
6 years ago
1.2.2
6 years ago
1.2.1
7 years ago
1.2.0
7 years ago
1.1.4
7 years ago
1.1.3
7 years ago
1.1.2
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago
0.4.4
7 years ago
0.4.3
7 years ago
0.4.2
7 years ago
0.4.1
7 years ago
0.4.0
7 years ago