0.0.1 • Published 2 years ago

@guolao/is-html-tag v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

is-html-tag

Check if the string is an HTML tag name.

gitHub license

Installation

# npm
npm i @guolao/is-html-tag

# yarn
yarn add @guolao/is-html-tag

# pnpm
pnpm add @guolao/is-html-tag

Usage

import isHTMLTag from '@guolao/is-html-tag'

isHTMLTag('a')   // true
isHTMLTag('div') // true

isHTMLTag('dog') // false
isHTMLTag('foo') // false

// custom element
customElementRegistry.define('my-custom-element', MyCustomElement)
isHTMLTag('my-custom-element') // true

License

MIT