# validate-html-tags

> Utility functions to escape custom tags in a string or check if string contains valid/custom tags

Latest version **1.0.1** (published 2020-06-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install validate-html-tags
pnpm add validate-html-tags
yarn add validate-html-tags
bun add validate-html-tags
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-06-06 |
| First published | 2020-06-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | piyoosh9 |
| Maintainers | piyoosh9 |

## Links

- npm: https://www.npmjs.com/package/validate-html-tags
- Repository: https://github.com/piyoosh9/validate-html-tags
- Issues: https://github.com/piyoosh9/validate-html-tags/issues
- npm.io page: https://npm.io/package/validate-html-tags

## Recent versions

- 1.0.1 (latest) — 2020-06-06
- 1.0.0 — 2020-06-06

## README

# Validate HTML Tags
Utility functions to escape custom tags in a string or check if any string contains valid or custom tags.


## Installation
```shell
$ npm i validate-html-tags
```

## How to use

#### 1. Method to escape custom tags
The method will return  the changed string in which all the custom HTML tags will be replaced with lt and gt 
```js
validateHTMLTags.escapeCustomTags('Send a <custom> and a valid <html> tag here to test!')
```

#### 2. Method to check if string contains any valid html tag or not 
This method will return a boolean stating whether the given string contains any valid html tag or not
```js
validateHTMLTags.isValidTag('Send a <custom> and a valid <html> tag here to test!')
``` 

#### 3. Method to check if string contains any custom html tag or not 
This method will return a boolean stating whether the given string contains any custom html tag or not
```js
validateHTMLTags.isCustomTag('Send a <custom> and a valid <html> tag here to test!')
```

## Misc

#### Considered Valid HTML tags list
We are considering W3Schools valid HTML elements, ref [here](https://www.w3schools.com/tags/ref_html_dtd.asp).


#### Suggestions
If you have any suggestions on what more can be added to this library, write to me at - piyush@whisperingbox.com

---
_Source: https://npm.io/package/validate-html-tags · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
