Object of "void elements" as defined by the WHATWG HTML Standard.
Switch branches/tags
Clone or download
hemanth Merge pull request #21 from ai/patch-1
Clean up npm package
Latest commit 9ba2c84 Mar 28, 2018

README.md

void-elements

Object of "void elements" defined by the HTML Standard

Exports an Object of "void element" node names as defined by the HTML spec.

The list is programatically generated from the latest WHATWG HTML Standard.

Build Status Developing Dependency Status npm version

Usage

const voidElements = require('void-elements');

assert(!voidElements['span'], '<span> is not a void element');
assert(voidElements['img'], '<img> is a void element');

License

MIT