├── .gitattributes ├── .gitignore ├── .npmignore ├── .travis.yml ├── .editorconfig ├── SECURITY.md ├── index.es.js ├── index.js ├── test └── index.js ├── package.json ├── README.md └── LICENSE /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | test/latest.js 3 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .npmignore 2 | .gitignore 3 | .travis.yml 4 | .editorconfig 5 | test/ 6 | build.js 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | sudo: false 3 | node_js: node 4 | 5 | notifications: 6 | email: 7 | on_success: never 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | | Version | Supported | 6 | | -------- | ------------------ | 7 | | ^3.1.0 | :white_check_mark: | 8 | | <3.1.0 | :x: | 9 | 10 | ## Reporting a Vulnerability 11 | 12 | To report a security vulnerability, please use the 13 | [Tidelift security contact](https://tidelift.com/security). 14 | Tidelift will coordinate the fix and disclosure. 15 | -------------------------------------------------------------------------------- /index.es.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file was automatically generated from `build.js`. 3 | * Do not manually edit. 4 | */ 5 | 6 | export default { 7 | "area": true, 8 | "base": true, 9 | "br": true, 10 | "col": true, 11 | "embed": true, 12 | "hr": true, 13 | "img": true, 14 | "input": true, 15 | "link": true, 16 | "meta": true, 17 | "param": true, 18 | "source": true, 19 | "track": true, 20 | "wbr": true 21 | }; 22 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file was automatically generated from `build.js`. 3 | * Do not manually edit. 4 | */ 5 | 6 | module.exports = { 7 | "area": true, 8 | "base": true, 9 | "br": true, 10 | "col": true, 11 | "embed": true, 12 | "hr": true, 13 | "img": true, 14 | "input": true, 15 | "link": true, 16 | "meta": true, 17 | "param": true, 18 | "source": true, 19 | "track": true, 20 | "wbr": true 21 | }; 22 | -------------------------------------------------------------------------------- /test/index.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert'); 2 | const voidElements = require('../'); 3 | assert(!voidElements['span'], ' is not a void element'); 4 | assert( voidElements['img'] , ' is a void element'); 5 | 6 | const latestVoidElements = require('./latest'); 7 | assert.deepEqual( 8 | voidElements, 9 | latestVoidElements, 10 | 'The list of void elements has changed, run "npm run update" to update this list.' 11 | ); 12 | 13 | console.log('tests passed'); 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "void-elements", 3 | "version": "3.1.0", 4 | "description": "Array of \"void elements\" defined by the HTML specification.", 5 | "main": "index.js", 6 | "jsnext:main": "index.es.js", 7 | "scripts": { 8 | "pretest": "node build.js test/latest.js", 9 | "test": "node test", 10 | "update": "node build.js index.js index.es.js:es" 11 | }, 12 | "keywords": [ 13 | "html", 14 | "void-elements", 15 | "elements" 16 | ], 17 | "files": [ 18 | "index.js", 19 | "index.es.js" 20 | ], 21 | "repository": "pugjs/void-elements", 22 | "author": "hemanth.hm", 23 | "engines": { 24 | "node": ">=0.10.0" 25 | }, 26 | "license": "MIT", 27 | "bugs": { 28 | "url": "https://github.com/pugjs/void-elements/issues" 29 | }, 30 | "homepage": "https://github.com/pugjs/void-elements", 31 | "devDependencies": { 32 | "jsdom": "^9.9.1" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | void-elements 2 | ============== 3 | 4 | ### Object of "void elements" defined by the HTML Standard 5 | 6 | Exports an `Object` of "void element" node names as defined by the HTML spec. 7 | 8 | The list is programatically generated from the [latest WHATWG HTML Standard](https://html.spec.whatwg.org/multipage/syntax.html#void-elements). 9 | 10 | [![Build Status](https://img.shields.io/travis/pugjs/void-elements/master.svg?style=flat)](https://travis-ci.org/pugjs/void-elements) 11 | [![Developing Dependency Status](https://img.shields.io/david/dev/pugjs/void-elements.svg?style=flat)](https://david-dm.org/pugjs/void-elements#info=devDependencies) 12 | [![npm version](https://img.shields.io/npm/v/void-elements.svg?style=flat)](https://www.npmjs.org/package/void-elements) 13 | 14 | Usage 15 | ----- 16 | 17 | ```js 18 | const voidElements = require('void-elements'); 19 | 20 | assert(!voidElements['span'], ' is not a void element'); 21 | assert(voidElements['img'], ' is a void element'); 22 | ``` 23 | 24 | License 25 | ------- 26 | 27 | MIT 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 hemanth 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | --------------------------------------------------------------------------------