Installation
Quick Take
Idea
This package aims to have the most excessive list of all legit attribute names that can be put into HTML. Currently we have a list of 702 attribute names.
This includes deprecated attributes, Microsoft-proprietary-ones that email templates use (like mso-line-height-rule
) and other-ones you’ve probably never seen before.
API — allHtmlAttribs
Imported it like this:
import { allHtmlAttribs } from "html-all-known-attributes";
allHtmlAttribs
is a Set of 702 strings — all HTML attribute names known to the Humanity.
Sets are more performant than arrays but the API is slightly different, for example, Array.prototype.includes()
equivalent is Set.prototype.has()
.