🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

node-stripr

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

node-stripr

Node Script for stripping content

0.1.1
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

node-stripr

Node.js Script for stripping content

Installation

$ npm install node-stripr

Usage Example

var stripr = require('node-stripr');

var strippedContent = stripr('<html><head><title>Test</title></head><body>Hello World</body></html>');
// strippedContent = 'Hello World'

// You can also add custom stripping rules:

var customStrippingRules = {
  // key: identifier<string>, value: stripping regex<regex>
  // e.g. strip a footer
  '<footer': /<footer(?:.|\n|\r)+?(<\/footer>|\/>)/i
};

stripr('<html><head><title>Test</title></head><body>Hello World<footer>No way</footer></body></html>', customStrippingRules);
// returns 'Hello World' again ;)

Keywords

strip content

FAQs

Package last updated on 19 Mar 2013

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