vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Interface ObjectEqualsOptions

    Describe options for the objectEquals function

    interface ObjectEqualsOptions {
        ignoreArrayOrder?: boolean;
        ignoreExtraElements?: boolean;
        ignoreExtraProperties?: boolean;
        ignoreMissingProperties?: boolean;
        objectCompare?: (a: object, b: object) => boolean;
        primitiveCompare?: (a: unknown, b: unknown) => boolean;
    }
    Index

    Properties

    ignoreArrayOrder?: boolean

    Ignore the order of the elements in an array when comparing arrays for equality.

    ignoreExtraElements?: boolean

    Ignore extra elements in an array when comparing arrays for equality. For example when array a looks like [1, 2, 3] and array b looks like [1, 2, 3, 4] the arrays are considered equal even though array b has an extra element.

    ignoreExtraProperties?: boolean

    Ignore extra properties in object b when comparing object a for equality. For example when object b looks like { a: 1, b: 2 } and object a looks like { a: 1 } the objects are considered equal even though object b has an extra property

    ignoreMissingProperties?: boolean

    Ignore missing properties in object b when comparing object a for equality. For example when object a looks like { a: 1, b: 2 } and object b looks like { a: 1 } the objects are considered equal even though object b is missing the b property.

    objectCompare?: (a: object, b: object) => boolean

    Function to compare 2 objects for equality, defaults to objectEquals-comparison; the function should return true if the 2 objects are equal otherwise false. If the function is not specified the objectEquals-function is used to compare the objects;

    primitiveCompare?: (a: unknown, b: unknown) => boolean

    Function to compare 2 primitives for equality, defaults to ===-comparison; the function should return true if the 2 primitives are equal otherwise false.