mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
amend: converted spaced to tabs
This commit is contained in:
parent
8c6a8d858e
commit
cf69ff4bc8
1 changed files with 6 additions and 6 deletions
|
@ -9,12 +9,12 @@ const scanner = require('object-scan')
|
||||||
// tree: {foo: [{bar: 1}], hey: {there: [{bar: 2}]}}
|
// tree: {foo: [{bar: 1}], hey: {there: [{bar: 2}]}}
|
||||||
// selector: **[*].bar
|
// selector: **[*].bar
|
||||||
const findInTree = (tree, selector, onResult) => {
|
const findInTree = (tree, selector, onResult) => {
|
||||||
scanner([selector], {
|
scanner([selector], {
|
||||||
joined: false,
|
joined: false,
|
||||||
filterFn: (key, value, { parents }) => {
|
filterFn: (key, value, { parents }) => {
|
||||||
onResult(value, parents[0], key);
|
onResult(value, parents[0], key);
|
||||||
}
|
}
|
||||||
})(tree);
|
})(tree);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = findInTree
|
module.exports = findInTree
|
||||||
|
|
Loading…
Add table
Reference in a new issue