Closed lewisblackwood closed 3 years ago
Hi,
Great library 👍
I found using mapValuesDeep that if the options are left at the default leavesOnly: false, then it mutates the original object. If leavesOnly: true then the original object is not mutated.
mapValuesDeep
leavesOnly: false
leavesOnly: true
You can see an example repl.it here.
// leavesOnly: true { sourceData: { hello: 'world' }, mappedData: { hello: 'WORLD' } } // leavesOnly: false { sourceData: { hello: 'WORLD' }, mappedData: { hello: 'WORLD' } }
Is this the expected behaviour?
Hi, thank you for report, looks like a bug, will check in next few days.
Hi,
Great library 👍
I found using
mapValuesDeep
that if the options are left at the defaultleavesOnly: false
, then it mutates the original object. IfleavesOnly: true
then the original object is not mutated.You can see an example repl.it here.
Is this the expected behaviour?