{"id":23053675,"url":"https://github.com/component/xhr-image","last_synced_at":"2025-06-16T23:42:43.027Z","repository":{"id":9223897,"uuid":"11038866","full_name":"component/xhr-image","owner":"component","description":"XHR2 driven images for progress events","archived":false,"fork":false,"pushed_at":"2014-04-22T04:16:19.000Z","size":132,"stargazers_count":39,"open_issues_count":1,"forks_count":3,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-05-08T17:06:20.371Z","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":"2013-06-28T21:41:16.000Z","updated_at":"2023-08-18T06:04:47.000Z","dependencies_parsed_at":"2022-09-22T15:42:31.733Z","dependency_job_id":null,"html_url":"https://github.com/component/xhr-image","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fxhr-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fxhr-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fxhr-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fxhr-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/component","download_url":"https://codeload.github.com/component/xhr-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229890688,"owners_count":18140153,"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:19:07.446Z","updated_at":"2024-12-16T00:19:08.077Z","avatar_url":"https://github.com/component.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# xhr-image\n\n  XHR-driven `Image` for progress events to make pretty progress indicators when loading images.\n\n## Installation\n\n  Install with [component(1)](http://component.io):\n\n    $ component install component/xhr-image\n\n## Example\n\n```js\nvar XHRImage = require('xhr-image');\n\nvar img = new XHRImage('http://i.cloudup.com/0chKjveyrS.png');\n\nimg.on('progress', function(e){\n  progress.style.width = (e.percent | 0) + '%';\n});\n\nimg.on('load', function(){\n  var el = new Image;\n  el.src = URL.createObjectURL(img.xhr.response);\n  document.body.appendChild(el);\n});\n```\n\n## Events\n\n - `open`\n - `sent`\n - `receiving`\n - `load`\n - `progress`\n\n## API\n\n### Image(src)\n\n  Request the given img `src`.\n\n### .xhr\n\n  The XHR request.\n\n### .abort()\n\n  Abort the request.\n\n## License\n\n  MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Fxhr-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomponent%2Fxhr-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Fxhr-image/lists"}