UNPKG

json-schema-library

Version:

Customizable and hackable json-validator and json-schema utilities for traversal, data generation and validation

8 lines (7 loc) 209 B
/** * ts type guard for json error * @returns true if passed type is a JsonError */ export function isJsonError(error) { return (error === null || error === void 0 ? void 0 : error.type) === "error"; }