Socket
Socket
Sign inDemoInstall

find-replace

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-replace - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

20

lib/find-replace.js
"use strict";
var t = require("typical");
var arrayify = require("array-back");
var testValue = require("test-value");

@@ -23,21 +24,2 @@ /**

function testValue(value, test){
if (t.isPlainObject(test)){
return Object.keys(test).every(function(prop){
return testValue(value[prop], test[prop]);
});
} else if (Array.isArray(test)){
var tests = test;
return tests.some(function(test){
return testValue(value, test);
});
} else if (test instanceof RegExp){
return test.test(value);
} else if (typeof test === "function"){
return test(value);
} else {
return test === value;
}
}
/**

@@ -44,0 +26,0 @@ @param {array} - the input array

3

package.json
{
"name": "find-replace",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "0.2.0",
"version": "0.2.1",
"description": "Find and replace items of an array",

@@ -27,4 +27,5 @@ "repository": "https://github.com/75lb/find-replace.git",

"array-back": "^1.0.1",
"test-value": "^1.0.0",
"typical": "^2.2.0"
}
}
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