{"id":23053581,"url":"https://github.com/component/favicon","last_synced_at":"2025-08-15T04:30:44.138Z","repository":{"id":4442739,"uuid":"5581084","full_name":"component/favicon","owner":"component","description":"Dynamic favicon library via data uris (canvas.toDataURL() etc)","archived":false,"fork":false,"pushed_at":"2013-08-23T12:01:03.000Z","size":70,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-08T17:12:29.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/component.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-28T05:16:30.000Z","updated_at":"2018-11-08T13:31:18.000Z","dependencies_parsed_at":"2022-09-21T16:21:11.485Z","dependency_job_id":null,"html_url":"https://github.com/component/favicon","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Ffavicon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Ffavicon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Ffavicon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Ffavicon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/component","download_url":"https://codeload.github.com/component/favicon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229890555,"owners_count":18140116,"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-12-16T00:18:41.562Z","updated_at":"2024-12-16T00:18:42.108Z","avatar_url":"https://github.com/component.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Favicon\n\n  Dynamically change a favicon using a data uri string, typically\n  from `canvas.toDataURL()`.\n\n## Installation\n\n```\n$ component install component/favicon\n```\n\n## Example\n\n Count from 0 through 9:\n\n```js\nvar icon = require('favicon');\nvar canvas = document.createElement('canvas');\ncanvas.width = canvas.height = 16;\nvar ctx = canvas.getContext('2d');\nctx.font = '16px Helvetica, Arial, sans-serif';\n\nvar nums = [0,1,2,3,4,5,6,7,8,9];\nvar i = 0;\n\nsetInterval(function(){\n  ctx.clearRect(0, 0, 16, 16);\n  var n = nums[i++ % 10];\n  ctx.fillText(n, 0, 15);\n  icon(canvas.toDataURL());\n}, 300);\n```\n\n## API\n\n### icon(string)\n\n  Set the favicon to the given data uri `string`.\n\n### icon.reset()\n\n  Reset to the original favicon.\n\n## License\n\n  MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Ffavicon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomponent%2Ffavicon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Ffavicon/lists"}