Created
May 28, 2021 18:28
-
-
Save sergueyarellano/3cb58f488a66d43a5db3a53b521b9b17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doSomething (payload) { | |
const newPayload = cloneDeep(payload) // cloning to avoid mutations on source | |
const result = composeResult(newPayload) // doing something | |
// set the result in a path | |
return set(newPayload, 'my.path', result) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment