sindresorhus

srcset

Parse and stringify the HTML <img> srcset attribute

by sindresorhus

JavaScript

JavaScript96.3%
TypeScript3.7%

Commit activity

Last 12 weeks · 1 commit

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template
santicros

Hi! This PR fixes #17 Adds fix for stringifySrcset with strict giving error: Passing descriptor parameter to validDescriptorCheck in stringifySrcset Added a test case to verify stringifySrcset works correctly in strict mode with valid width and density descriptors

santicros · 9mo ago
azerum

Here's an example: Which seems to be pretty surprising. Is it intentional? The spec I've found says that: A width descriptor, consisting of: ASCII whitespace, a valid non-negative integer giving a number greater than zero representing the width descriptor value, and a U+0077 LATIN SMALL LETTER W character. "Valid non-negative integer" is defined as A string is a valid non-negative integer if it consists of one or more ASCII digits. It seems like the definition implies that the string must consist only of digits Maybe it's allowed due to rules for parsing integers?

azerum · 1y ago
Structured data for AI agents

Repository: sindresorhus/srcset. Description: Parse and stringify the HTML <img> srcset attribute Stars: 144, Forks: 16. Primary language: JavaScript. Languages: JavaScript (96.3%), TypeScript (3.7%). License: MIT. Latest release: v5.0.3 (9mo ago). Open PRs: 0, open issues: 0. Last activity: 1mo ago. Community health: 85%. Top contributors: sindresorhus, nfriedly, willianveiga, BendingBender, jimmywarting, kevin940726, Richienb, santicros.