UNPKG

json-schema-library

Version:

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

10 lines (9 loc) 279 B
import { isSchemaNode } from "./SchemaNode"; export { isSchemaNode }; /** * 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"; }