Created
May 26, 2020 03:54
-
-
Save tbmreza/a2b212b688d4f3fa1e7d17c487393073 to your computer and use it in GitHub Desktop.
JS utils
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
export function objectCopy(obj) { | |
if (typeof obj === "object") { | |
return JSON.parse(JSON.stringify(obj)); | |
} else { | |
console.log(obj); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment