New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
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 - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

test/test.html

4

index.js

@@ -17,3 +17,3 @@ var allowedInputTypes = ['number', 'string'];

'<html': /<html((.|\n|\r)*?)>/i,
'<head': /<head(?:.|\n|\r)+?(<\/head>|\/>)/i,
'<head': /(<head(.|\n|\r)*<\/head>|<head(.)*\/>)/i,
'<body': /<body((.|\n|\r)*?)>/i,

@@ -35,3 +35,3 @@ '</body>': /<\/body>/i,

// check if keys have a match in input and strip away using the regexes
if (inputLower.indexOf(key) > -1) {
if (inputLower.indexOf(key.toLowerCase()) > -1) {
output = output.replace(stripRegexes[key], '');

@@ -38,0 +38,0 @@ }

{
"name": "node-stripr",
"version": "0.1.0",
"version": "0.1.1",
"description": "Node Script for stripping content",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,2 +0,3 @@

var stripr = require('../index.js');
var stripr = require('../index.js'),
fs = require('fs');

@@ -52,2 +53,8 @@ describe('stripr', function() {

it('strips unnecessary html structure from a test-file based on optionally provided stripping rules', function() {
expect(stripr(fs.readFileSync('test/test.html').toString(), {
'<!-- Generated': /<!(.|\n|\r)*<\/h2><a name="JIRA_Report"><\/a>/i
})).toBe('<table>Test</table>');
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc