adminjs
Version:
Admin panel for apps written in node.js
19 lines (13 loc) • 730 B
Markdown
the Long story short this method:
- changes: `nested.nested2.normalInner`
- to `["nested", "nested.nested2", "nested.nested2.normalInner"]`
So it can be used to search for the param in a { FlattenParams} object.
Formally it changes path in "flatten" notation, to an Array of all possible
keys, which could have searched property.
When `skipArrayIndexes` is set to true it also it takes care of the arrays, which are
separated by numbers (indexes). Then it:
- changes: `nested.0.normalInner.1`
- to: `nested.normalInner`
Everything because when we look for a property of a given path it can be inside a
mixed property. So first, we have to find top-level mixed property, and then,
step by step, find inside each of them.