tagless
v1.0.1
Published
Tagless is a library that remove html tags from string, it's useful for sanitizing user input
Downloads
24
Maintainers
Readme
tagless
remove html tags from a string
Install
npm install tagless
Usage
const tagless = require('tagless')
// or
const { removeAll, removeByTag } = require('tagless')
import tagless from 'tagless'
// or
import { removeAll, removeByTag } from 'tagless'
removeAll
parse all tags from a string
parms: (string)
tagless.removeAll('<p>hello</p>') // hello
removeByTag
parse a specific tag from a string
parms: (string, tag)
tagless.removeByTag('<p>hello</p>', 'p') // hello
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please open an issue or submit a pull request.
Author
Mahmoud Ibrahiam