{"id":20980495,"url":"https://github.com/hyperjumptech/favicon-fetcher","last_synced_at":"2025-05-14T15:30:39.316Z","repository":{"id":168914934,"uuid":"644735797","full_name":"hyperjumptech/favicon-fetcher","owner":"hyperjumptech","description":"A utility to fetch a website's favicon","archived":false,"fork":false,"pushed_at":"2024-06-05T09:20:43.000Z","size":1038,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-28T08:49:26.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperjumptech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-24T06:39:05.000Z","updated_at":"2024-06-18T23:23:12.000Z","dependencies_parsed_at":"2023-07-06T14:16:24.546Z","dependency_job_id":null,"html_url":"https://github.com/hyperjumptech/favicon-fetcher","commit_stats":null,"previous_names":["hyperjumptech/favicon-fetcher"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Ffavicon-fetcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Ffavicon-fetcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Ffavicon-fetcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjumptech%2Ffavicon-fetcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperjumptech","download_url":"https://codeload.github.com/hyperjumptech/favicon-fetcher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254171543,"owners_count":22026459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T05:28:51.296Z","updated_at":"2025-05-14T15:30:38.343Z","avatar_url":"https://github.com/hyperjumptech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Favicon Fetcher\n\n`favicon-fetcher` is a utility to fetch a website's favicon by using multiple strategies. By default, it will fetch the `href` attribute of the first `\u003clink rel=\"icon\"\u003e` element in the target's HTML file.\n\n## How to Use\n\n1. Install the dependencies\n\n```bash\nnpm install @hyperjumptech/favicon-fetcher\n```\n\n2. Use it in your code\n\n```js\nconst { getFavicon, EStrategies } = require('@hyperjumptech/favicon-fetcher') // CommonJS\nimport { getFavicon, EStrategies } from '@hyperjumptech/favicon-fetcher' // ES6\n\nconst result1 = await getFavicon('https://www.google.com') // using all strategies\nconsole.log(result1) // returns a binary or a URL\n\nconst options = {\n  strategies: [EStrategies.duckduckgo, EStrategies.default], // use the DuckDuckGo API and default method\n  output: 'url' // can be 'url' or 'buffer'\n}\n\nconst result2 = await getFavicon('https://www.google.com', options) // use some strategies\nconsole.log(result2) // returns a binary or URL from either DuckDuckGo API or default method\n```\n\n## Options\n\n| Options    | Type       | Description                                                                                                                                                                                                                           | Default                                       |\n| ---------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |\n| strategies | `string[]` | Define the strategies that will be used to fetch the favicon. Each strategy will be run sequentially. Currently available strategies are: `http`, `duckduckgo`, `google`, and `default`. Strategies defined will be run sequentially. | `['http', 'duckduckgo', 'google', 'default']` |\n| output     | `string`   | Define the output format of the fetched favicon. Can be either `url` or `buffer`. URL will return the favicon URL, buffer will return the image of the favicon                                                                        | `'url'`                                       |\n\n## Contributing\n\n`favicon-fetcher` is a Node.js application written in TypeScript.\nIt was developed on **node v16 (LTS)**, and **npm v8**.\n\nTo start developing, clone this repository, then install the dependencies:\n\n```bash\ngit clone git@github.com:hyperjumptech/favicon-fetcher.git\nnpm ci\n```\n\nTo keep the formatting consistent, run the following command to format the source code:\n\n```bash\nnpm run format\n```\n\nFinally you can also run `npm run test` to prevent regression.\n\nOnce you have made the changes, open a Pull Request and explain the issue your change will fix or the feature your change will add.\n\n## Discussions\n\nIf you need help, want to give feedback, or have a great idea to improve Favicon Fetcher, get involved! Let us know in the [Github discussions](https://github.com/hyperjumptech/favicon-fetcher/discussions).\n\nPlease abide by the [Contributor's Code of Conduct](CODE_OF_CONDUCTS.md)\n\n## License\n\n[MIT](./LICENSE.txt) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjumptech%2Ffavicon-fetcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperjumptech%2Ffavicon-fetcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjumptech%2Ffavicon-fetcher/lists"}