Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

array-tools

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-tools - npm Package Compare versions

Comparing version 1.8.2 to 1.8.3

4

package.json
{
"name": "array-tools",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "1.8.2",
"version": "1.8.3",
"description": "Lightweight tool-kit for working with arrays",

@@ -38,5 +38,5 @@ "repository": "https://github.com/75lb/array-tools.git",

"dependencies": {
"object-tools": "^1.1.0",
"object-tools": "^1.6.1",
"typical": "^2.1"
}
}

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

var test = require("tape"),
a = require("../");
var test = require("tape");
var a = require("../");

@@ -15,1 +15,13 @@ test("findWhere", function(t){

});
test(".findWhere deep query", function(t){
var arr = [
{ one: { number: 1, letter: "a" } },
{ one: { number: 2, letter: "b" } }
];
t.deepEqual(a.findWhere(arr, { one: { number: 1 } }), { one: { number: 1, letter: "a" } });
t.deepEqual(a.findWhere(arr, { one: { number: 2 } }), { one: { number: 2, letter: "b" } });
t.deepEqual(a.findWhere(arr, { one: { letter: "b" } }), { one: { number: 2, letter: "b" } });
t.deepEqual(a.findWhere(arr, { one: { number: 3 } }), null);
t.end();
});

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

var test = require("tape"),
a = require("../");
var test = require("tape");
var a = require("../");

@@ -44,1 +44,20 @@ test("where", function(t){

});
test(".where deep query", function(t){
var arr = [
{ one: { number: 1, letter: "a" } },
{ one: { number: 2, letter: "b" } },
{ one: { number: 3, letter: "b" } }
];
t.deepEqual(a.where(arr, { one: { letter: "b" } }), [
{ one: { number: 2, letter: "b" } },
{ one: { number: 3, letter: "b" } }
]);
t.deepEqual(a.where(arr, { one: { number: 2, letter: "b" } }), [
{ one: { number: 2, letter: "b" } }
]);
t.deepEqual(a.where(arr, { one: { number: 1, letter: "a" } }), [
{ one: { number: 1, letter: "a" } }
]);
t.end();
});
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