New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

strip-tags

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strip-tags

Strip specific tags from a string of HTML

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

strip-tags NPM version

Strip specific tags from a string of HTML

Install with npm

npm i strip-tags --save

Usage

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>'

Run tests

Install dev dependencies:

node i -d && mocha

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright (c) 2015 Jon Schlinkert
Released under the MIT license

This file was generated by verb on January 18, 2015.

Keywords

cheerio

FAQs

Package last updated on 18 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts