Reference/Autoevals library/TypeScript/Modules

Namespace: JSONDiff

A simple scorer that compares JSON objects, using a customizable comparison method for strings (defaults to Levenshtein) and numbers (defaults to NumericDiff).

Functions

partial

partial<T>(args): Scorer<any, Omit<{ numberScorer?: Scorer<number, object> ; preserveStrings?: boolean ; stringScorer?: Scorer<string, object> }, T> & Partial<Pick<{ numberScorer?: Scorer<number, object> ; preserveStrings?: boolean ; stringScorer?: Scorer<string, object> }, T>>>

Type parameters

NameType
Textends "stringScorer" | "numberScorer" | "preserveStrings"

Parameters

NameType
args{ [K in "stringScorer" | "numberScorer" | "preserveStrings"]: Object[K] }

Returns

Scorer<any, Omit<{ numberScorer?: Scorer<number, object> ; preserveStrings?: boolean ; stringScorer?: Scorer<string, object> }, T> & Partial<Pick<{ numberScorer?: Scorer<number, object> ; preserveStrings?: boolean ; stringScorer?: Scorer<string, object> }, T>>>

Defined in

autoevals/js/partial.ts:5

On this page