tagless
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i tagless

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

5.05 kB

Total Files

7

Last publish

Collaborators

  • remahmoud