page-icon-finder
Find the best icon for a web page
Last updated a month ago by ustlz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install page-icon-finder 
SYNC missed versions from official npm registry.

Actions Status codecov

Page Icon

A library to find the highest resolution website logo for a given url.

This a TypeScript implementation of the original page-icon library.

Installation

yarn global add page-icon-finder
or
yarn add page-icon-finder

Usage

CLI

USAGE
  $ page-icon-finder <URL> [EXTENSION]

ARGUMENTS
  URL        URL to search the icon in
  EXTENSION  (.jpg|.png|.ico) Filetype to search for

OPTIONS
  -b, --buffer  Only output the whole Buffer of the icon

EXAMPLES
  $ pageicon <url> [extension]
  $ pageicon https://www.wikipedia.com
  $ pageicon https://www.wikipedia.com .png

Programmatic

import pageIcon from 'page-icon';

const URL = 'https://www.facebook.com/';
  try {
    const icon = await pageIcon(URL);
    console.log('ICON: ', icon);
  } catch (err) {
    console.error(err);
  }

Option

Optionally the function takes one of the following extensions .jpg, .png or .ico.

Example Icon Object

{ 
    source: 'https://www.facebook.com/images/fb_icon_325x325.png',
    name: 'www.facebook.com',
    data: <Buffer 89 50 4e ... >,
    size: 1919,
    ext: '.png',
    mime: 'image/png' 
}

License

Original author: Goh Jia Hao
Forked from https://github.com/jiahaog/page-icon

MIT

Current Tags

  • 1.1.1                                ...           latest (a month ago)

13 Versions

  • 1.1.1                                ...           a month ago
  • 1.1.0                                ...           6 months ago
  • 1.0.10                                ...           6 months ago
  • 1.0.9                                ...           6 months ago
  • 1.0.8                                ...           6 months ago
  • 1.0.7                                ...           6 months ago
  • 1.0.6 [deprecated]           ...           6 months ago
  • 1.0.5 [deprecated]           ...           6 months ago
  • 1.0.4 [deprecated]           ...           6 months ago
  • 1.0.3 [deprecated]           ...           6 months ago
  • 1.0.2 [deprecated]           ...           6 months ago
  • 1.0.1 [deprecated]           ...           6 months ago
  • 1.0.0 [deprecated]           ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 10
Dependencies (8)
Dev Dependencies (14)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |