0.0.0-development • Published 2 years ago

web-icon-scraper v0.0.0-development

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

web-icon-scraper

A Node Package to retrieve an array of favicons and apple-touch-icon images sorting them into ascending or descending size order.

Usage

Example Use:

  const webIconScraper = require('web-icon-scraper');

  webIconScraper({
    url: 'https://github.com',
    sort: 'des',
    limit: 1,
    checkStatus: false,
    followRedirectsCount: 0
  }).then(output => {
    console.log(output);
  });

  // example output:
  [
    {
      type: 'favicon',
      size: 20,
      link: 'https://github.githubassets.com/favicon.ico'
    }
  ]

Options:

url: 'url' as String (required)

sort: 'asc' or 'des' (descending or ascending in icon size)

limit: limit icons as Integer.

checkStatus: When true it checks the status code of each icon, returns all of status code 200.

followRedirectsCount: Limit the number of redirects, defaults to 0.

Test

from the /test directory run, yarn test

Collaboration

Please get in touch to share ideas or collaborate with me on this library.

TODO's

  • Refine the code to improve performance
  • Add Typscript
0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago