{"id":15412696,"url":"https://github.com/molefrog/srcset-parse","last_synced_at":"2025-07-01T07:07:43.250Z","repository":{"id":146470310,"uuid":"279033910","full_name":"molefrog/srcset-parse","owner":"molefrog","description":"🏙  Extra tiny `srcset` attribute parser ~150B","archived":false,"fork":false,"pushed_at":"2024-05-24T09:44:49.000Z","size":15,"stargazers_count":16,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T10:57:23.022Z","etag":null,"topics":["images","micro-library","responsive-images","srcset","zero-dependency"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/srcset-parse","language":"TypeScript","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/molefrog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2020-07-12T09:40:58.000Z","updated_at":"2024-12-18T18:35:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a4ab0df-c981-4ff7-ae95-94ca2f603b2d","html_url":"https://github.com/molefrog/srcset-parse","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"cd44465e2e6f7c3d40cf46422466c8fe47295ee1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/molefrog/srcset-parse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molefrog%2Fsrcset-parse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molefrog%2Fsrcset-parse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molefrog%2Fsrcset-parse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molefrog%2Fsrcset-parse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/molefrog","download_url":"https://codeload.github.com/molefrog/srcset-parse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/molefrog%2Fsrcset-parse/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262916655,"owners_count":23383887,"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":["images","micro-library","responsive-images","srcset","zero-dependency"],"created_at":"2024-10-01T16:54:10.166Z","updated_at":"2025-07-01T07:07:43.220Z","avatar_url":"https://github.com/molefrog.png","language":"TypeScript","readme":"# srcset-parse\n\nAn extra small [`srcset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-srcset)\nattribute parser compliant with [the latest spec](https://html.spec.whatwg.org/multipage/images.html#srcset-attributes).\nIt's is inspired by the [**srcset** package](https://github.com/sindresorhus/srcset) and has following features:\n\n- Extra tiny, only ~150B;\n- Supports URLs that contain commas;\n- Zero or one descriptors per image definitions are supported (like `2x` or `100w`, but not both!);\n\nExample usage:\n\n```js\nimport parse from \"srcset-parse\";\n\n/**\n * [\n *   { url: \"hifi-cat.jpeg\",  density: 3 },\n *   { url: \"lowfi-cat.jpeg\", width: 128 },\n * ]\n */\nparse(\"hifi-cat.jpeg 3x, lowfi-cat.jpeg 128w\");\n```\n\n### Using with TypeScript\n\nThe library is written in TypeScript, so you can import types if needed:\n\n```js\nimport parse, { ImageCandidate } from \"srcset-parse\";\n\nconst result: ImageCandidate[] = parse(\"icon@2x.png 2x, icon.png 1x\");\n```\n\n### Platform support\n\nThis library is written according to the _ES2015 standard_. Make sure your platform\nsupports it, or your project is configured to transpile external modules.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmolefrog%2Fsrcset-parse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmolefrog%2Fsrcset-parse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmolefrog%2Fsrcset-parse/lists"}