common.js 275 B

12345678910111213
  1. /**
  2. * Returns a fresh copy of the passed in value
  3. *
  4. * @param {unknown} toClone A value to clone
  5. * @returns {unknown} A clone of the input
  6. */
  7. function DeepClone(toClone) {
  8. return JSON.parse(JSON.stringify(toClone));
  9. }
  10. module.exports = {
  11. DeepClone: DeepClone,
  12. };