Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imguolao/is-html-tag
Check if the string is an HTML tag name.
https://github.com/imguolao/is-html-tag
Last synced: 14 days ago
JSON representation
Check if the string is an HTML tag name.
- Host: GitHub
- URL: https://github.com/imguolao/is-html-tag
- Owner: imguolao
- License: mit
- Created: 2023-02-13T12:00:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-13T16:16:16.000Z (almost 2 years ago)
- Last Synced: 2024-12-31T22:06:08.785Z (24 days ago)
- Language: JavaScript
- Size: 68.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# is-html-tag
Check if the string is an HTML tag name.
[![gitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/imguolao/is-html-tag/blob/main/LICENSE)
## Installation
```sh
# npm
npm i @guolao/is-html-tag# yarn
yarn add @guolao/is-html-tag# pnpm
pnpm add @guolao/is-html-tag
```## Usage
```ts
import isHTMLTag from '@guolao/is-html-tag'isHTMLTag('a') // true
isHTMLTag('div') // trueisHTMLTag('dog') // false
isHTMLTag('foo') // false// custom element
customElementRegistry.define('my-custom-element', MyCustomElement)
isHTMLTag('my-custom-element') // true
```## License
[MIT](LICENSE)