shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
mapDeep
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.object
This function is the same as the “map” one. The only difference is that this one goes deep into the object
Params
- object*-Object
The object you want to map through
- processor*-Function
The processor function that take as parameter the actual property value, the current property name and the full dotted path to the current property
- settings{}Object
An object of settings to configure your mapDeep process:
Example
import { mapDeep } from '@blackbyte/sugar/object';
mapDeep({
hello: 'world'
}, ({object, prop, value, path}) => {
return '~ ' + value;
});Settings
- classInstancesfalseBoolean
Specify if you want the objects to be processed the same as other values
- arraytrueBoolean
Specify if we want to process also arrays or not
- clonefalseBoolean
Specify if you want to clone the object passed before cleaning it
- privatePropstrueBoolean
Specify if you want to clean also the private properties that starts with ”_“
Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space