GitShow/sindresorhus/srcset
sindresorhus

srcset

Parse and stringify the HTML <img> srcset attribute

by sindresorhus
Star on GitHubForknpm

JavaScript

143 stars16 forks8 contributorsQuiet · 5mo agoSince 2013v5.0.3MIT

Meet the team

See all 8 on GitHub →
sindresorhus
sindresorhus27 contributions
nfriedly
nfriedly2 contributions
willianveiga
willianveiga2 contributions
BendingBender
BendingBender1 contribution
jimmywarting
jimmywarting1 contribution
kevin940726
kevin9407261 contribution
Richienb
Richienb1 contribution
santicros
santicros1 contribution

Languages

View on GitHub →
JavaScript96.3%
TypeScript3.7%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

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

Recent fixes

View closed PRs →
santicros
Fix stringifySrcset with strict error in 5.0.2MergedPR

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 · 5mo ago
santicros
5.0.2 strict breaks stringifySrcset with valid widthClosedIssue

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!

santicros · 5mo ago
azerum
`w` descriptors that start with digits but end with non-digits (e.g. 100abcw) are considered validClosedIssue

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 · 9mo ago
Structured data for AI agents

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

·@ofershap

Replace github.com with gitshow.dev