Pathfinder 1e for Foundry VTT
    Preparing search index...

    Function deepClone

    • Clone value.

      Similar to foundry.utils.deepClone() but does not return references for DataModel instances.

      Parameters

      • original: object

        Original data

      • Optionaloptions: { source?: boolean; strict?: boolean } = {}

        Additional options

        • Optionalsource?: boolean

          Return source data instead for supporting data.

        • Optionalstrict?: boolean

          Throw an error if a reference would be returned.

      Returns object

      • Cloned object
      • Documents are returned as references (unless source option is enabled)
      • PIXI graphics are returned as references
      • DataModels are extracted like objects with parent excluded
      • Unsupported objects call .toObject() when present, otherwise as references
      • With strict mode if reference would be returned.