UNPKG

immutable-json-patch

Version:

Immutable JSON patch with support for reverting operations

28 lines 921 B
/** * Test deep equality of two JSON values, objects, or arrays */ export declare function isEqual<T, U>(a: T, b: U): boolean; /** * Test whether two values are strictly equal */ export declare function strictEqual(a: unknown, b: unknown): boolean; /** * Get all but the last items from an array */ export declare function initial<T>(array: Array<T>): Array<T>; /** * Get the last item from an array */ export declare function last<T>(array: Array<T>): T | undefined; /** * Test whether array1 starts with array2 * @param array1 * @param array2 * @param [isEqual] Optional function to check equality */ export declare function startsWith<T>(array1: Array<T>, array2: Array<T>, isEqual?: typeof strictEqual): boolean; /** * Test whether a value is an Object or an Array (and not a primitive JSON value) */ export declare function isObjectOrArray(value: unknown): boolean; //# sourceMappingURL=utils.d.ts.map