shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
getGlob
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.object
Retreive an object value using a dotted path like “myObject.myProperty.myValue”. It support glob patterns like “something..id” and returns you a new object containing all values with the path that matches the passed glob pattern.
Params
- obj*-Object
The object in which to set the value
- glob*-String
A glob to describe what you want into the object
- settings{}Object
A settings object to configure your glob get process
Return
- -Mixed
The getted value or “undefined” if nothing found…
Example
import { getGlob } from '@blackbyte/sugar/object';
getGlob({
hello: {
world: true,
plop: false
}, 'hello.');Settings
- unflattentrueBoolean
Specify if you want the result object to be unflattend using the
unflattensugar function
Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space