MicroCommunityWeb/node_modules/void-elements
2021-04-23 10:14:20 +08:00
..
test 优化代码 2021-04-23 10:14:20 +08:00
.gitattributes 优化代码 2021-04-23 10:14:20 +08:00
.npmignore 优化代码 2021-04-23 10:14:20 +08:00
.travis.yml 优化代码 2021-04-23 10:14:20 +08:00
index.js 优化代码 2021-04-23 10:14:20 +08:00
LICENSE 优化代码 2021-04-23 10:14:20 +08:00
package.json 优化代码 2021-04-23 10:14:20 +08:00
pre-publish.js 优化代码 2021-04-23 10:14:20 +08:00
README.md 优化代码 2021-04-23 10:14:20 +08:00

void-elements

Array of "void elements" defined by the HTML specification

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

The list is programatically generated from the latest W3C HTML draft.

Build Status Developing Dependency Status NPM version

Usage

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

assert(voidElements.indexOf('span') === -1, '<span> is not a void element');
assert(voidElements.indexOf('img') !== -1, '<img> is a void element');

License

MIT