Created
May 8, 2019 16:29
-
-
Save dl6nm/c09e27a36ee76c21edb8c69f473e6ac8 to your computer and use it in GitHub Desktop.
Clone JavaScript object with JSON stringify and parse in the callas pdfToolbox
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 clone(obj) { | |
/* | |
Use this function in a callas pdfToolbox process plan for cloning objects (e.g. app.doc) | |
to manipulate them after a check was executed. | |
*/ | |
if (obj !== undefined) { | |
return JSON.parse(JSON.stringify(obj)); | |
} | |
return obj; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment