Recursively clones the specified object ignoring all fieldnames in the given array of transient fields. ObjectIdentity#FIELD_NAME is always ignored by this function.

  • Parameters

    • obj: any

      Object to be cloned.

    • transients: null | string[] = null

      Optional array of strings representing the fieldname to be ignored.

    • shallow: boolean = false

      Optional boolean argument to specify if a shallow clone should be created, that is, one where all object references are not cloned or, in other words, one where only atomic (strings, numbers) values are cloned. Default is false.

    Returns any