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

deepdash

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deepdash - npm Package Compare versions

Comparing version 1.6.3 to 1.6.4

2

package.json
{
"name": "deepdash",
"version": "1.6.3",
"version": "1.6.4",
"description": "Object tree traversal for lodash",

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

@@ -150,3 +150,3 @@ 'use strict';

//https://stackoverflow.com/questions/48270845/deep-filtering-array-of-objects-javascript
it('deep-filtering-array-of-objects-javascript', function() {
it('deep-filtering-array-of-objects-javascript', () => {
var types = [

@@ -253,2 +253,54 @@ {

});
// https://stackoverflow.com/questions/53381935/javascript-find-deeply-nested-objects
it('javascript-find-deeply-nested-objects', () => {
var obj = [
{
label: 'first',
id: 1,
children: [],
},
{
label: 'second',
id: 2,
children: [
{
label: 'third',
id: 3,
children: [
{
label: 'fifth',
id: 5,
children: [],
},
{
label: 'sixth',
id: 6,
children: [
{
label: 'seventh',
id: 7,
children: [],
},
],
},
],
},
{
label: 'fourth',
id: 4,
children: [],
},
],
},
];
var children = _.filterDeep(
obj,
function(value, key, path, depth, parent) {
if (key == 'children' && parent.id == 6 && value.length) return true;
},
{ leafsOnly: false }
);
expect(children.length).to.not.equal(0);
// console.log(children);
});
});
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