UNPKG

@astronautlabs/jsonpath

Version:

Query JavaScript objects with JSONPath expressions. Robust / safe JSONPath engine for Node.js.

11 lines (10 loc) 299 B
export class assert { static ok(predicate : boolean, message : string) { if (!predicate) throw new Error(message); } static equal(value : any, expected : any, message : string) { if (value !== expected) throw new Error(message); } }