Code Monkey home page Code Monkey logo

get-website-favicon's Introduction

get the favicons url from any website

Install

$ npm install get-website-favicon --save

Usage

Example

var getFavicons = require('get-website-favicon')
getFavicons('github.com').then(data=>{
    /* 
    {
        url: 'https://github.com',
        icons: [{
            src: 'https://github.com/favicon.ico',
            sizes: '',
            type: 'image/x-icon',
            origin: 'site/favicon.ico'
        }, {
            src: 'https://github.com/fluidicon.png',
            sizes: '',
            type: '',
            origin: '<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">'
        }, {
            src: 'https://assets-cdn.github.com/images/modules/open_graph/github-logo.png',
            sizes: '',
            type: '',
            origin: '<meta property="og:image" content="https://assets-cdn.github.com/images/modules/open_graph/github-logo.png">'
        }, {
            src: 'https://assets-cdn.github.com/images/modules/open_graph/github-mark.png',
            sizes: '',
            type: '',
            origin: '<meta property="og:image" content="https://assets-cdn.github.com/images/modules/open_graph/github-mark.png">'
        }, {
            src: 'https://assets-cdn.github.com/images/modules/open_graph/github-octocat.png',
            sizes: '',
            type: '',
            origin: '<meta property="og:image" content="https://assets-cdn.github.com/images/modules/open_graph/github-octocat.png">'
        }, {
            src: 'https://assets-cdn.github.com/pinned-octocat.svg',
            sizes: '',
            type: '',
            origin: '<link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#000000">'
        }, {
            src: 'https://assets-cdn.github.com/favicon.ico',
            sizes: '',
            type: 'image/x-icon',
            origin: '<link rel="icon" type="image/x-icon" class="js-site-favicon" href="https://assets-cdn.github.com/favicon.ico">'
        }, {
            src: 'https://assets-cdn.github.com/apple-touch-icon-114x114.png',
            sizes: '114x114',
            type: '',
            origin: 'https://github.com/manifest.json'
        }, {
            src: 'https://assets-cdn.github.com/apple-touch-icon-120x120.png',
            sizes: '120x120',
            type: '',
            origin: 'https://github.com/manifest.json'
        }, {
            src: 'https://assets-cdn.github.com/apple-touch-icon-144x144.png',
            sizes: '144x114',
            type: '',
            origin: 'https://github.com/manifest.json'
        }, {
            src: 'https://assets-cdn.github.com/apple-touch-icon-152x152.png',
            sizes: '152x152',
            type: '',
            origin: 'https://github.com/manifest.json'
        }, {
            src: 'https://assets-cdn.github.com/apple-touch-icon-180x180.png',
            sizes: '180x180',
            type: '',
            origin: 'https://github.com/manifest.json'
        }, {
            src: 'https://assets-cdn.github.com/apple-touch-icon-57x57.png',
            sizes: '57x57',
            type: '',
            origin: 'https://github.com/manifest.json'
        }, {
            src: 'https://assets-cdn.github.com/apple-touch-icon-60x60.png',
            sizes: '60x60',
            type: '',
            origin: 'https://github.com/manifest.json'
        }, {
            src: 'https://assets-cdn.github.com/apple-touch-icon-72x72.png',
            sizes: '72x72',
            type: '',
            origin: 'https://github.com/manifest.json'
        }, {
            src: 'https://assets-cdn.github.com/apple-touch-icon-76x76.png',
            sizes: '76x76',
            type: '',
            origin: 'https://github.com/manifest.json'
        }]
    }
    */
})

get-website-favicon's People

Contributors

reinforcezwei avatar zongyz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.