strip-tags
Version:
Strip specific tags from a string of HTML
49 lines (31 loc) • 1.07 kB
Markdown
> Strip specific tags from a string of HTML
```bash
npm i strip-tags --save
```
```js
var stripTags = require('strip-tags');
var html = '<head> <link href="abc.css"> <script src="xyz"></script> </head>';
stripTags(html, 'link');
//=> '<head> <script src="xyz"></script> </head>'
stripTags(html, ['link', 'script']);
//=> '<head> </head>'
```
Install dev dependencies:
```bash
node i -d && mocha
```
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/strip-tags/issues)
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
***
_This file was generated by [verb](https://github.com/assemble/verb) on January 18, 2015._