Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Function diffObject

    • Deeply difference an object against some other, returning the update keys and values.

      Parameters

      • original: object

        An object comparing data against which to compare

      • other: object

        An object containing potentially different data. Supports values that are DataFieldOperator instances.

      • Optionaloptions: {
            _d?: number;
            bidirectional?: boolean;
            deletionKeys?: boolean;
            inner?: boolean;
        } = {}

        Additional options which configure the diff operation

        • Optional_d?: number

          An internal depth tracker

        • Optionalbidirectional?: boolean

          Create a bidirectional diff (or "patch" in Unix parlance), setting a forced-deletion value where an entry is defined in the original object but not the other.

        • OptionaldeletionKeys?: boolean

          Apply special logic to deletion keys. They will only be kept if the original object has a corresponding key that could be deleted.

        • Optionalinner?: boolean

          Only recognize differences in other for keys which also exist in original

      Returns object

      An object of the data in other which differs from that in original