UNPKG

json-schema-library

Version:

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

12 lines (9 loc) 271 B
let isFile: (value: unknown) => value is File; // @ts-expect-error forced types isFile = () => false; try { if (typeof File === "function") { isFile = (value: unknown) => value instanceof File; } } catch (e) {} // eslint-disable-line export { isFile };