Socket
Socket
Sign inDemoInstall

@achmadk/void-elements

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @achmadk/void-elements

"void-elements" with TypeScript and ES Module support. Array of "void elements" defined by the HTML specification.


Version published
Weekly downloads
6
increased by100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

void-elements

:memo: 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.

npm version

:wrench: Usage

1. node.js

const voidElements = require('@achmadk/void-elements');

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

2. vite js (if have error importing void-elements)

import { defineConfig } from 'vite'

export default defineConfig({
  // rest of your vite configuration
  resolve: {
    alias: [
      // another aliases
      {
        find: 'void-elements',
        replacement: '@achmadk/void-elements'
      }
    ]
  }
})

License

MIT

Keywords

FAQs

Last updated on 17 Feb 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc