function copyValue(value) {
        if (typeof value === "string" || typeof value === "number") {
          return value;
        }
        return JSON.parse(JSON.stringify(value));
      }
/**
       * Makes a copy of a value. The returned value can be modified
       * without altering the original one. Although this is not needed
       * for strings or numbers and only needed for objects and arrays,
       * all these options are covered in a single function
       *
       * It is assumed that the argument is number, string, or contructions
       * of these types inside objects or arrays.
       */
Makes a copy of a value. The returned value can be modified
without altering the original one. Although this is not needed
for strings or numbers and only needed for objects and arrays,
all these options are covered in a single function

It is assumed that the argument is number, string, or contructions
of these types inside objects or arrays.
Makes a copy of a value . The returned value can be modified without altering the original one . Although this is not needed for strings or numbers and only needed for objects and arrays all these options are covered in a single function It is assumed that the argument is number string or contructions of these types inside objects or arrays .
function copyValue(value) {
        if (typeof value === "string" || typeof value === "number") {
          return value;
        }
        return JSON.parse(JSON.stringify(value));
      }
function copyValue ( value ) { if ( typeof value === "string" || typeof value === "number" ) { return value ; } return JSON . parse ( JSON . stringify ( value ) ) ; }
Makes a copy of a value.
Makes a copy of a value .