responsive images: add validation
responsive images: add validation: a task in smol-software-harbor (Harbor dataset). srcset() in src/srcset.js silently builds broken attributes from bad input. Make it throw a TypeError when widths is not a non-empty array, when a width is not a positive integer, or when the file name has no…
The task
`srcset()` in `src/srcset.js` silently builds broken attributes from bad input. Make it throw a `TypeError` when `widths` is not a non-empty array, when a width is not a positive integer, or when the file name has no extension (no dot, a leading dot only as in `.env`, or a trailing dot). Run `node --test…
Part of efederici/smol-software-harbor.