
Security News
Free Certified Patch for Critical Rails Active Storage Vulnerability
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.
@prettier/parse-srcset
Advanced tools
A spec-conformant JavaScript parser for the HTML5 srcset attribute
This repository is a fork of https://github.com/albell/parse-srcset for Prettier.
A javascript parser for the HTML5 srcset attribute, based on the WHATWG reference algorithm. It has an extensive test suite based on the W3C srcset conformance checker.
yarn add @prettier/parse-srcset
import parseSrcset from "@prettier/parse-srcset";
parseSrcset('elva-fairy-320w.jpg, elva-fairy-480w.jpg 1.5x, elva-fairy-640w.jpg 2x');
/*
[
{ source: { value: 'elva-fairy-320w.jpg', startOffset: 0 } },
{
source: { value: 'elva-fairy-480w.jpg', startOffset: 21 },
density: { value: 1.5 }
},
{
source: { value: 'elva-fairy-640w.jpg', startOffset: 47 },
density: { value: 2 }
}
]
*/
FAQs
A spec-conformant JavaScript parser for the HTML5 srcset attribute
The npm package @prettier/parse-srcset receives a total of 564,203 weekly downloads. As such, @prettier/parse-srcset popularity was classified as popular.
We found that @prettier/parse-srcset demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 open source maintainers collaborating on the project.

Security News
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.

Security News
/Threat Research
A malicious Ruby gem runs a credential-stealing worm during installation, poisons AI coding tools, and can wipe files when a stolen GitHub token is revoked.

Security News
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.