Class ObjectUtils

Constructors

Properties

diff: (originalObj: object, updatedObj: object) => object = diff

Deeply compare two objects and return the differences

Type declaration

    • (originalObj: object, updatedObj: object): object
    • Parameters

      • originalObj: object

        The first/initial object

      • updatedObj: object

        The second object to compare against

      Returns object

      The differences between the two objects

diffAsChanges: (
    originalObj: GenericObject,
    updatedObj: GenericObject,
) => ObjectChange[] = diffAsChanges

Deeply compare two objects and return the differences as changes

Type declaration

isEmptyObject: (item: unknown) => item is GenericObject = isEmptyObject

Type guard to check if an item is an empty object

Type declaration

    • (item: unknown): item is GenericObject
    • Parameters

      • item: unknown

        The item to check

      Returns item is GenericObject

      Whether the item is an empty object

isObject: (item: unknown) => item is GenericObject = isObject

Type guard to check if an item is an object

Type declaration

    • (item: unknown): item is GenericObject
    • Parameters

      • item: unknown

        The item to check

      Returns item is GenericObject

      Whether the item is an object