Created
August 6, 2021 05:41
-
-
Save MarsiBarsi/1edbd8072c688a4957f8032dc22b8744 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 expandObjWithStatus(obj, condition) { | |
return { | |
...obj, | |
...(condition && { | |
status: 'modified' | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment