
Product
Introducing Custom Tabs for Org Alerts
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.
strip-attributes
Advanced tools
Strip attributes from HTML tags.
Install with npm:
$ npm install --save strip-attributes
Pass a string of HTML to stripAttr():
var stripAttr = require('strip-attributes');
var str = '<h1 id="a" class="b">Foo</h1>';
// By default, all attributes are omitted
stripAttr(str);
//=> '<h1>Foo</h1>'
Omit specific attributes
Pass an array of specific attributes to omit to options.omit:
stripAttr(str, {omit: ['class']});
//=> '<h1 id="a" >Foo</h1>'
Keep specific attributes
Pass an array of specific attributes to keep to options.keep:
stripAttr(str, {keep: ['class']});
//=> '<h1 class="b">Foo</h1>'
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2017, Jon Schlinkert. Released under the MIT license.
This file was generated by verb-generate-readme, v0.2.3, on January 04, 2017.
FAQs
Strip attributes from HTML tags.
The npm package strip-attributes receives a total of 305 weekly downloads. As such, strip-attributes popularity was classified as not popular.
We found that strip-attributes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.