@guolao/is-html-tag
v0.0.1
Published
Check if the string is an HTML tag name.
Downloads
3
Maintainers
Readme
is-html-tag
Check if the string is an HTML tag name.
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