Last 12 weeks · 2 commits
4 of 6 standards met
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 (1mo ago). Open PRs: 0, open issues: 0. Last activity: 1mo ago. Community health: 85%. Top contributors: sindresorhus, nfriedly, willianveiga, BendingBender, jimmywarting, kevin940726, Richienb, santicros.
Hi!! I've found the version 5.0.2 in strict mode breaks a valid stringifySrcset: Simple example: Gives an error in 5.0.2 but not in 5.0.1. Thank you!
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?