eachDeep, filterDeep, findDeep, someDeep, omitDeep, pickDeep, keysDeep etc.. Tree traversal library written in Underscore/Lodash fashion
Installations
npm install deepdash
Developer Guide
Typescript
Yes
Module System
CommonJS, ESM
Node Version
14.17.0
NPM Version
6.14.13
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (99.77%)
HTML (0.23%)
Developer
Download Statistics
Total Downloads
14,061,345
Last Day
13,837
Last Week
66,922
Last Month
305,989
Last Year
3,158,289
GitHub Statistics
277 Stars
462 Commits
14 Forks
3 Watching
25 Branches
5 Contributors
Bundle Size
15.20 kB
Minified
4.30 kB
Minified + Gzipped
Package Meta Information
Latest Version
5.3.9
Package Id
deepdash@5.3.9
Size
267.04 kB
NPM Version
6.14.13
Node Version
14.17.0
Publised On
22 May 2021
Total Downloads
Cumulative downloads
Total Downloads
14,061,345
Last day
-8.2%
13,837
Compared to previous day
Last week
-16.8%
66,922
Compared to previous week
Last month
5.5%
305,989
Compared to previous month
Last year
-11.8%
3,158,289
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
24
Deepdash
eachDeep, filterDeep, findDeep, someDeep, omitDeep, pickDeep, keysDeep etc.. Tree traversal library written in Underscore/Lodash fashion. Standalone or as a Lodash mixin extension
Deepdash lib is used in PlanZed.org - awesome cloud mind map app created by the author of deepdash.
Plz check it, it's free and I need feedback ????
Installation
In a browser
Load script after Lodash, then pass a lodash instance to the deepdash function:
1<script src="https://cdn.jsdelivr.net/npm/lodash/lodash.min.js"></script> 2<script src="https://cdn.jsdelivr.net/npm/deepdash/browser/deepdash.min.js"></script> 3<script> 4 deepdash(_); 5 console.log(_.eachDeep); // --> new methods mixed into Lodash 6</script>
If you don't use Lodash - there is a standalone version:
1<script src="https://cdn.jsdelivr.net/npm/deepdash/browser/deepdash.standalone.min.js"></script> 2<script> 3 console.log(deepdash.eachDeep); // --> all the methods just work 4</script>
Standalone Deepdash weighs more then "dry" version, because it includes some of cherry-picked Lodash methods it depends on. But it's better to use Standalone version, than include full Lodash just as dependency, if you don't need Lodash.
Using npm:
npm i --save deepdash
In Node.js:
1// load Lodash if you need it 2const _ = require('lodash'); 3//mixin all the methods into Lodash object 4require('deepdash')(_); 5// or cherry-pick method you only need and mix it into lodash 6require('deepdash/addFilterDeep')(_); 7// or cherry-pick method separately if you don't want to mutate Lodash instance 8const filterDeep = require('deepdash/getFilterDeep')(_); 9// If you don't need Lodash - there is standalone version 10const deepdash = require('deepdash/standalone'); // full 11const filterDeep = require('deepdash/filterDeep'); // or separate standalone methods
There is also deepdash as ES6 module
npm i --save deepdash-es
1import lodash from 'lodash-es'; 2import deepdash from 'deepdash-es'; 3const _ = deepdash(lodash);
in the ES package there are same cherry-pick and/or standalone methods as in the main package.
1import filterDeep from 'deepdash-es/filterDeep';
or
1import { filterDeep } from 'deepdash-es/standalone';
or
1import _ from 'lodash-es'; 2import getFilterDeep from 'deepdash-es/getFilterDeep'; 3const filterDeep = getFilterDeep(_);
or
1import _ from 'lodash-es'; 2import addFilterDeep from 'deepdash-es/addFilterDeep'; 3addFilterDeep(_);// --> _.filterDeep
Demo
Example react+redux app with nested comments filtered by Deepdash.(source is here)
Methods
eachDeep (forEachDeep)
› iterate over all the children and sub-children ???? see docs
expand example
let children = [/* expand to see */];
1let children = [ 2 { 3 description: 'description for node 1', 4 comment: 'comment for node 1', 5 note: 'note for node 1', 6 name: 'node 1', 7 bad: false, 8 children: [ 9 { 10 description: 'description for node 1.1', 11 comment: 'comment for node 1.1', 12 note: 'note for node 1.1', 13 name: 'node 1.1', 14 bad: false, 15 }, 16 { 17 description: 'description for node 1.2', 18 comment: 'comment for node 1.2', 19 note: 'note for node 1.2', 20 name: 'node 1.2', 21 good: true, 22 }, 23 { 24 description: 'description for node 1.3', 25 comment: 'comment for node 1.3', 26 note: 'note for node 1.3', 27 name: 'node 1.3', 28 bad: true, 29 good: false, 30 }, 31 ], 32 }, 33 { 34 description: 'description for node 2', 35 comment: 'comment for node 2', 36 note: 'note for node 2', 37 name: 'node 2', 38 good: true, 39 children: [ 40 { 41 description: 'description for node 2.1', 42 comment: 'comment for node 2.1', 43 note: 'note for node 2.1', 44 name: 'node 2.1', 45 bad: false, 46 }, 47 { 48 description: 'description for node 2.2', 49 comment: 'comment for node 2.2', 50 note: 'note for node 2.2', 51 name: 'node 2.2', 52 good: true, 53 }, 54 { 55 description: 'description for node 2.3', 56 comment: 'comment for node 2.3', 57 note: 'note for node 2.3', 58 name: 'node 2.3', 59 bad: true, 60 good: false, 61 }, 62 ], 63 }, 64 { 65 description: 'description for node 3', 66 comment: 'comment for node 3', 67 note: 'note for node 3', 68 name: 'node 3', 69 bad: true, 70 good: false, 71 children: [ 72 { 73 description: 'description for node 3.1', 74 comment: 'comment for node 3.1', 75 note: 'note for node 3.1', 76 name: 'node 3.1', 77 bad: false, 78 }, 79 { 80 description: 'description for node 3.2', 81 comment: 'comment for node 3.2', 82 note: 'note for node 3.2', 83 name: 'node 3.2', 84 good: true, 85 }, 86 { 87 description: 'description for node 3.3', 88 comment: 'comment for node 3.3', 89 note: 'note for node 3.3', 90 name: 'node 3.3', 91 bad: true, 92 good: false, 93 }, 94 ], 95 }, 96];
1 function displayField(val, key, parent, context) { 2 if (_.isArray(parent)) { 3 key = '[' + key + ']'; 4 } 5 console.log( 6 _.repeat(' ', context.depth) + 7 '→ ' + 8 key + 9 ': ' + 10 (_.isArray(val) 11 ? '[' + val.length + ']' 12 : _.isObject(val) 13 ? '{' + (val.name || '') + '}' 14 : val) 15 ); 16 } 17 18 console.log('\n = Iterate over tree (each child object) = \n'); 19 20 _.eachDeep(children, displayField, { childrenPath: 'children' }); 21 22 console.log('\n = Iterate over object (each field) = \n'); 23 24 _.eachDeep(children, displayField);
Console:
= Iterate over tree (each child object) =
→ [0]: {node 1}
→ [0]: {node 1.1}
→ [1]: {node 1.2}
→ [2]: {node 1.3}
→ [1]: {node 2}
→ [0]: {node 2.1}
→ [1]: {node 2.2}
→ [2]: {node 2.3}
→ [2]: {node 3}
→ [0]: {node 3.1}
→ [1]: {node 3.2}
→ [2]: {node 3.3}
= Iterate over object (each field) =
→ [0]: {node 1}
→ description: description for node 1
→ comment: comment for node 1
→ note: note for node 1
→ name: node 1
→ bad: false
→ children: [3]
→ [0]: {node 1.1}
→ description: description for node 1.1
→ comment: comment for node 1.1
→ note: note for node 1.1
→ name: node 1.1
→ bad: false
→ [1]: {node 1.2}
→ description: description for node 1.2
→ comment: comment for node 1.2
→ note: note for node 1.2
→ name: node 1.2
→ good: true
→ [2]: {node 1.3}
→ description: description for node 1.3
→ comment: comment for node 1.3
→ note: note for node 1.3
→ name: node 1.3
→ bad: true
→ good: false
→ [1]: {node 2}
→ description: description for node 2
→ comment: comment for node 2
→ note: note for node 2
→ name: node 2
→ good: true
→ children: [3]
→ [0]: {node 2.1}
→ description: description for node 2.1
→ comment: comment for node 2.1
→ note: note for node 2.1
→ name: node 2.1
→ bad: false
→ [1]: {node 2.2}
→ description: description for node 2.2
→ comment: comment for node 2.2
→ note: note for node 2.2
→ name: node 2.2
→ good: true
→ [2]: {node 2.3}
→ description: description for node 2.3
→ comment: comment for node 2.3
→ note: note for node 2.3
→ name: node 2.3
→ bad: true
→ good: false
→ [2]: {node 3}
→ description: description for node 3
→ comment: comment for node 3
→ note: note for node 3
→ name: node 3
→ bad: true
→ good: false
→ children: [3]
→ [0]: {node 3.1}
→ description: description for node 3.1
→ comment: comment for node 3.1
→ note: note for node 3.1
→ name: node 3.1
→ bad: false
→ [1]: {node 3.2}
→ description: description for node 3.2
→ comment: comment for node 3.2
→ note: note for node 3.2
→ name: node 3.2
→ good: true
→ [2]: {node 3.3}
→ description: description for node 3.3
→ comment: comment for node 3.3
→ note: note for node 3.3
→ name: node 3.3
→ bad: true
→ good: false
filterDeep
› deep filter object ???? see docs
expand example
let children = [/* expand to see */];
1let children = [ 2 { 3 description: 'description for node 1', 4 comment: 'comment for node 1', 5 note: 'note for node 1', 6 name: 'node 1', 7 bad: false, 8 children: [ 9 { 10 description: 'description for node 1.1', 11 comment: 'comment for node 1.1', 12 note: 'note for node 1.1', 13 name: 'node 1.1', 14 bad: false, 15 }, 16 { 17 description: 'description for node 1.2', 18 comment: 'comment for node 1.2', 19 note: 'note for node 1.2', 20 name: 'node 1.2', 21 good: true, 22 }, 23 { 24 description: 'description for node 1.3', 25 comment: 'comment for node 1.3', 26 note: 'note for node 1.3', 27 name: 'node 1.3', 28 bad: true, 29 good: false, 30 }, 31 ], 32 }, 33 { 34 description: 'description for node 2', 35 comment: 'comment for node 2', 36 note: 'note for node 2', 37 name: 'node 2', 38 good: true, 39 children: [ 40 { 41 description: 'description for node 2.1', 42 comment: 'comment for node 2.1', 43 note: 'note for node 2.1', 44 name: 'node 2.1', 45 bad: false, 46 }, 47 { 48 description: 'description for node 2.2', 49 comment: 'comment for node 2.2', 50 note: 'note for node 2.2', 51 name: 'node 2.2', 52 good: true, 53 }, 54 { 55 description: 'description for node 2.3', 56 comment: 'comment for node 2.3', 57 note: 'note for node 2.3', 58 name: 'node 2.3', 59 bad: true, 60 good: false, 61 }, 62 ], 63 }, 64 { 65 description: 'description for node 3', 66 comment: 'comment for node 3', 67 note: 'note for node 3', 68 name: 'node 3', 69 bad: true, 70 good: false, 71 children: [ 72 { 73 description: 'description for node 3.1', 74 comment: 'comment for node 3.1', 75 note: 'note for node 3.1', 76 name: 'node 3.1', 77 bad: false, 78 }, 79 { 80 description: 'description for node 3.2', 81 comment: 'comment for node 3.2', 82 note: 'note for node 3.2', 83 name: 'node 3.2', 84 good: true, 85 }, 86 { 87 description: 'description for node 3.3', 88 comment: 'comment for node 3.3', 89 note: 'note for node 3.3', 90 name: 'node 3.3', 91 bad: true, 92 good: false, 93 }, 94 ], 95 }, 96];
1 console.log('\n = Filter tree (good children) = \n'); 2 3 console.log( 4 _.filterDeep(children, 'good', { childrenPath: 'children' }) 5 ); 6 7 console.log('\n = Filter object (names of good children) = \n'); 8 9 console.log( 10 _.filterDeep(children, (val, key, parent) => { 11 if (key == 'name' && parent.good) return true; 12 }) 13 );
Console:
= Filter tree (good children) =
[
{
"description": "description for node 1",
"comment": "comment for node 1",
"note": "note for node 1",
"name": "node 1",
"bad": false,
"children": [
{
"description": "description for node 1.2",
"comment": "comment for node 1.2",
"note": "note for node 1.2",
"name": "node 1.2",
"good": true
}
]
},
{
"description": "description for node 2",
"comment": "comment for node 2",
"note": "note for node 2",
"name": "node 2",
"good": true,
"children": [
{
"description": "description for node 2.2",
"comment": "comment for node 2.2",
"note": "note for node 2.2",
"name": "node 2.2",
"good": true
}
]
},
{
"description": "description for node 3",
"comment": "comment for node 3",
"note": "note for node 3",
"name": "node 3",
"bad": true,
"good": false,
"children": [
{
"description": "description for node 3.2",
"comment": "comment for node 3.2",
"note": "note for node 3.2",
"name": "node 3.2",
"good": true
}
]
}
]
= Filter object (names of good children) =
[
{
"children": [
{
"name": "node 1.2"
}
]
},
{
"name": "node 2",
"children": [
{
"name": "node 2.2"
}
]
},
{
"children": [
{
"name": "node 3.2"
}
]
}
]
findDeep
› find first matching deep meta-value ???? see docs
example a bit later
let children = [/* expand to see */];
1// next time
1// sorry
Console:
❤️
findValueDeep
› find first matching deep value ???? see docs
example a bit later
let children = [/* expand to see */];
1// next time
1// sorry
Console:
❤️
findPathDeep
› find the path of the first matching deep value ???? see docs
example a bit later
let children = [/* expand to see */];
1// next time
1// sorry
Console:
❤️
mapDeep
› get array of values processed by iteratee. ???? see docs
expand example
1 let res = _.mapDeep(
2 { hello: { from: { the: 'deep world', and: 'deepdash' } } },
3 (v) => v.toUpperCase(),
4 { leavesOnly: true }
5 );
6 // res -> ['DEEP WORLD','DEEPDASH']
mapValuesDeep
› get the object with same structure, but transformed values. ???? see docs
expand example
1 let res = _.mapValuesDeep(
2 { hello: { from: { the: 'deep world' } } },
3 (v) => v.toUpperCase(),
4 { leavesOnly: true }
5 );
6 // res -> { hello: { from: { the: 'DEEP WORLD' } } }
mapKeysDeep
› get the object with same values, but transformed keys. ???? see docs
expand example
1 let res = _.mapKeysDeep(
2 { hello: { from: { the: 'deep world' } } },
3 (v, k) => k.toUpperCase()
4 );
5 // res -> { HELLO: { FROM: { THE: 'deep world' } } }
reduceDeep
› like reduce, but deep ???? see docs
expand example
1 let max = _.reduceDeep({ a: 2, b: 3, c: { d: 6, e: [1, 5, 8] } },
2 (acc, value, key, parent, ctx) => {
3 if (typeof value == 'number' && (typeof acc != 'number' || value > acc))
4 return value;
5 return undefined;
6 }
7 );
8 // max == 8
someDeep
› returns true if some matching deep value found ???? see docs
example a bit later
let children = [/* expand to see */];
1// next time
1// sorry
Console:
❤️
pickDeep
› pick values by paths specified by endings or regexes ???? see docs
expand example
let children = [/* expand to see */];
1let children = [ 2 { 3 description: 'description for node 1', 4 comment: 'comment for node 1', 5 note: 'note for node 1', 6 name: 'node 1', 7 bad: false, 8 children: [ 9 { 10 description: 'description for node 1.1', 11 comment: 'comment for node 1.1', 12 note: 'note for node 1.1', 13 name: 'node 1.1', 14 bad: false, 15 }, 16 { 17 description: 'description for node 1.2', 18 comment: 'comment for node 1.2', 19 note: 'note for node 1.2', 20 name: 'node 1.2', 21 good: true, 22 }, 23 { 24 description: 'description for node 1.3', 25 comment: 'comment for node 1.3', 26 note: 'note for node 1.3', 27 name: 'node 1.3', 28 bad: true, 29 good: false, 30 }, 31 ], 32 }, 33 { 34 description: 'description for node 2', 35 comment: 'comment for node 2', 36 note: 'note for node 2', 37 name: 'node 2', 38 good: true, 39 children: [ 40 { 41 description: 'description for node 2.1', 42 comment: 'comment for node 2.1', 43 note: 'note for node 2.1', 44 name: 'node 2.1', 45 bad: false, 46 }, 47 { 48 description: 'description for node 2.2', 49 comment: 'comment for node 2.2', 50 note: 'note for node 2.2', 51 name: 'node 2.2', 52 good: true, 53 }, 54 { 55 description: 'description for node 2.3', 56 comment: 'comment for node 2.3', 57 note: 'note for node 2.3', 58 name: 'node 2.3', 59 bad: true, 60 good: false, 61 }, 62 ], 63 }, 64 { 65 description: 'description for node 3', 66 comment: 'comment for node 3', 67 note: 'note for node 3', 68 name: 'node 3', 69 bad: true, 70 good: false, 71 children: [ 72 { 73 description: 'description for node 3.1', 74 comment: 'comment for node 3.1', 75 note: 'note for node 3.1', 76 name: 'node 3.1', 77 bad: false, 78 }, 79 { 80 description: 'description for node 3.2', 81 comment: 'comment for node 3.2', 82 note: 'note for node 3.2', 83 name: 'node 3.2', 84 good: true, 85 }, 86 { 87 description: 'description for node 3.3', 88 comment: 'comment for node 3.3', 89 note: 'note for node 3.3', 90 name: 'node 3.3', 91 bad: true, 92 good: false, 93 }, 94 ], 95 }, 96];
1 console.log('\n = Pick name and description only = \n'); 2 3 console.log( 4 _.pickDeep(children, ['name', 'description']) 5 );
Console:
= Pick name and description only =
[
{
"description": "description for node 1",
"name": "node 1",
"children": [
{
"description": "description for node 1.1",
"name": "node 1.1"
},
{
"description": "description for node 1.2",
"name": "node 1.2"
},
{
"description": "description for node 1.3",
"name": "node 1.3"
}
]
},
{
"description": "description for node 2",
"name": "node 2",
"children": [
{
"description": "description for node 2.1",
"name": "node 2.1"
},
{
"description": "description for node 2.2",
"name": "node 2.2"
},
{
"description": "description for node 2.3",
"name": "node 2.3"
}
]
},
{
"description": "description for node 3",
"name": "node 3",
"children": [
{
"description": "description for node 3.1",
"name": "node 3.1"
},
{
"description": "description for node 3.2",
"name": "node 3.2"
},
{
"description": "description for node 3.3",
"name": "node 3.3"
}
]
}
]
omitDeep
› get object without paths specified by endings or regexes ???? see docs
expand example
let children = [/* expand to see */];
1let children = [ 2 { 3 description: 'description for node 1', 4 comment: 'comment for node 1', 5 note: 'note for node 1', 6 name: 'node 1', 7 bad: false, 8 children: [ 9 { 10 description: 'description for node 1.1', 11 comment: 'comment for node 1.1', 12 note: 'note for node 1.1', 13 name: 'node 1.1', 14 bad: false, 15 }, 16 { 17 description: 'description for node 1.2', 18 comment: 'comment for node 1.2', 19 note: 'note for node 1.2', 20 name: 'node 1.2', 21 good: true, 22 }, 23 { 24 description: 'description for node 1.3', 25 comment: 'comment for node 1.3', 26 note: 'note for node 1.3', 27 name: 'node 1.3', 28 bad: true, 29 good: false, 30 }, 31 ], 32 }, 33 { 34 description: 'description for node 2', 35 comment: 'comment for node 2', 36 note: 'note for node 2', 37 name: 'node 2', 38 good: true, 39 children: [ 40 { 41 description: 'description for node 2.1', 42 comment: 'comment for node 2.1', 43 note: 'note for node 2.1', 44 name: 'node 2.1', 45 bad: false, 46 }, 47 { 48 description: 'description for node 2.2', 49 comment: 'comment for node 2.2', 50 note: 'note for node 2.2', 51 name: 'node 2.2', 52 good: true, 53 }, 54 { 55 description: 'description for node 2.3', 56 comment: 'comment for node 2.3', 57 note: 'note for node 2.3', 58 name: 'node 2.3', 59 bad: true, 60 good: false, 61 }, 62 ], 63 }, 64 { 65 description: 'description for node 3', 66 comment: 'comment for node 3', 67 note: 'note for node 3', 68 name: 'node 3', 69 bad: true, 70 good: false, 71 children: [ 72 { 73 description: 'description for node 3.1', 74 comment: 'comment for node 3.1', 75 note: 'note for node 3.1', 76 name: 'node 3.1', 77 bad: false, 78 }, 79 { 80 description: 'description for node 3.2', 81 comment: 'comment for node 3.2', 82 note: 'note for node 3.2', 83 name: 'node 3.2', 84 good: true, 85 }, 86 { 87 description: 'description for node 3.3', 88 comment: 'comment for node 3.3', 89 note: 'note for node 3.3', 90 name: 'node 3.3', 91 bad: true, 92 good: false, 93 }, 94 ], 95 }, 96];
1 console.log('\n = Omit paths not ending with "e" = \n'); 2 3 console.log( 4 _.omitDeep(children, /[^e]$/i, { onMatch: { skipChildren: false } }), 5 );
Console:
= Omit paths not ending with "e" =
[
{
"note": "note for node 1",
"name": "node 1",
"children": [
{
"note": "note for node 1.1",
"name": "node 1.1"
},
{
"note": "note for node 1.2",
"name": "node 1.2"
},
{
"note": "note for node 1.3",
"name": "node 1.3"
}
]
},
{
"note": "note for node 2",
"name": "node 2",
"children": [
{
"note": "note for node 2.1",
"name": "node 2.1"
},
{
"note": "note for node 2.2",
"name": "node 2.2"
},
{
"note": "note for node 2.3",
"name": "node 2.3"
}
]
},
{
"note": "note for node 3",
"name": "node 3",
"children": [
{
"note": "note for node 3.1",
"name": "node 3.1"
},
{
"note": "note for node 3.2",
"name": "node 3.2"
},
{
"note": "note for node 3.3",
"name": "node 3.3"
}
]
}
]
index
› get an object with all the paths as keys and corresponding values ???? see docs
expand example
1 let index = _.index( 2 { 3 a: { 4 b: { 5 c: [1, 2, 3], 6 'hello world': {}, 7 }, 8 }, 9 }, 10 { leavesOnly: true } 11 ); 12 console.log(index);
Console:
{ 'a.b.c[0]': 1,
'a.b.c[1]': 2,
'a.b.c[2]': 3,
'a.b["hello world"]': {} }
paths (keysDeep)
› get an array of paths ???? see docs
expand example
1 let paths = _.paths( 2 { 3 a: { 4 b: { 5 c: [1, 2, 3], 6 'hello world': {}, 7 }, 8 }, 9 }, 10 { leavesOnly: false } 11 ); 12 console.log(paths);
Console:
[ 'a',
'a.b',
'a.b.c',
'a.b.c[0]',
'a.b.c[1]',
'a.b.c[2]',
'a.b["hello world"]' ]
condense
› condense sparse array ???? see docs
expand example
1 let arr = ['a', 'b', 'c', 'd', 'e']; 2 delete arr[1]; 3 console.log(arr); 4 delete arr[3]; 5 console.log(arr); 6 _.condense(arr); 7 console.log(arr);
Console:
[ 'a', <1 empty item>, 'c', 'd', 'e' ]
[ 'a', <1 empty item>, 'c', <1 empty item>, 'e' ]
[ 'a', 'c', 'e' ]
condenseDeep
› condense all the nested arrays ???? see docs
expand example
1 let obj = { arr: ['a', 'b', { c: [1, , 2, , 3] }, 'd', 'e'] }; 2 delete obj.arr[1]; 3 delete obj.arr[3]; 4 _.condenseDeep(obj); 5 console.log(obj);
Console:
{ arr: [ 'a', { c: [ 1, 2, 3 ] }, 'e' ] }
exists
› like a _.has
but returns false
for empty array slots ???? see docs
expand example
1 var obj = [, { a: [, 'b'] }]; 2 console.log(_.exists(obj, 0)); // false 3 console.log(_.exists(obj, 1)); // true 4 console.log(_.exists(obj, '[1].a[0]')); // false 5 console.log(_.exists(obj, '[1].a[1]')); // true
pathToString
› convert an array to string path (opposite to _.toPath) ???? see docs
expand example
1 console.log(_.pathToString(['a', 'b', 'c', 'defg', 0, '1', 2.3] 2 ,'prefix1', 'prefix2', '[3]')); 3 // prefix1.prefix2[3].a.b.c.defg[0][1]["2.3"] 4 console.log(_.pathToString(['"', '"', '"'])); 5 // ["\\""]["\\""]["\\""] 6 console.log(_.pathToString('it.s.a.string')); 7 // it.s.a.string
See full docs for details.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/29 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 2 are checked with a SAST tool
Reason
57 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-4x6g-3cmx-w76r
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-cph5-m8f7-6c5x
- Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q
- Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-jg8v-48h5-wgxg
- Warn: Project is vulnerable to: GHSA-36fh-84j7-cv5h
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-px4h-xg32-q955
- Warn: Project is vulnerable to: GHSA-q674-xm3x-2926
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx
- Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch
- Warn: Project is vulnerable to: GHSA-hpqj-7cj6-hfj8
- Warn: Project is vulnerable to: GHSA-4vrv-93c7-m92j
- Warn: Project is vulnerable to: GHSA-qqqw-gm93-qf6m
- Warn: Project is vulnerable to: GHSA-69f9-h8f9-7vjf
- Warn: Project is vulnerable to: GHSA-652h-xwhf-q4h6
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc
Score
1.7
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to deepdash
deepdash-es
➔ 𝐃eep extension for 𝐋odash-es: ✓ eachDeep ✓ filterDeep ✓ pickDeep ✓ omitDeep ✓ keysDeep ✓ index ✓ condenseDeep ⋮ Parent nodes tracking ⋮ Circular references check ⋮ Leaves only mode ⋮ Path as a valid js string or an array ⋮
extendash
loadsh extended with deepdash and some other functions.
deepdash.mapvaluesdeep.dev
deepdash's mapValuesDeep standalone