1. parse-srcset
A spec-conformant JavaScript parser for the HTML5 srcset attribute
parse-srcset
Package: parse-srcset
Created by: albell
Last modified: Thu, 23 Jun 2022 11:12:31 GMT
Version: 1.0.2
License: MIT
Downloads: 7,384,352
Repository: https://github.com/albell/parse-srcset

Install

npm install parse-srcset
yarn add parse-srcset

parse-srcset

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. It conforms to the jQuery JSCS style rules.

Tests are written using Intern-geezer for compatibility.

To run the tests in console:

$ npm test

Or in a browser, just open the html file at:

node_modules/intern-geezer/client.html?config=tests/intern

I’m on twitter @tweetywheaty.

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code