How to use parse-favicon - 1 common examples

To help you get started, we’ve selected a few parse-favicon examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BlackGlory / favicon-detector / src / popup.js View on Github external
async componentDidMount() {
    try {
      const { url, html } = await getPageInfo()
      const icons = await parseFavicon(html, {
        baseURI: url
      , allowUseNetwork: true
      , allowParseImage: true
      }, true)
      for (const i in icons) {
        if (!icons[i].size) {
          try {
            icons[i].size = await getRemoteImageSize(icons[i].url)
          } catch(e) {
            void(0)
          }
        }
      }
      this.setState({
        loading: false
      , data: icons

parse-favicon

Parse HTML to get icon information

MIT
Latest version published 7 months ago

Package Health Score

53 / 100
Full package analysis

Popular parse-favicon functions