Have ideas to improve npm?Join in the discussion! »

    metascraper-logo-favicon
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/metascraper-logo-favicon package

    5.21.5 • Public • Published

    metascraper-logo-favicon

    npm Dependency Status

    metascraper logo favicon fallback.

    Install

    $ npm install metascraper-logo-favicon --save

    Usage

    metascraper-logo-favicon([options])

    options

    pickFn

    Type: function

    It will be used for picking the value to extract from a set of favicon detected on the markup.

    const pickFn = (sizes, pickDefault) => {
      const appleTouchIcon = sizes.find((item) => item.rel.includes('apple'))
      return appleTouchIcon || pickDefault(sizes)
    }
    
    const metascraper = require('metascraper')([
      require('metascraper-logo-favicon')({
        pickFn
      })
    ])

    If you don't specific it, the favicon with the bigger size will be picked.

    gotOpts

    Type: object

    Any option provided here will passed to got#options.

    In addition, these options are set by default:

    {
      "timeout": 3000
    }

    License

    metascraper-logo-favicon © microlink.io, Released under the MIT License.
    Authored and maintained by microlink.io with help from contributors.

    microlink.io · GitHub @microlink.io · Twitter @microlinkhq

    Install

    npm i metascraper-logo-favicon

    DownloadsWeekly Downloads

    16,955

    Version

    5.21.5

    License

    MIT

    Unpacked Size

    29 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar