json-schema-typescript-generator
Version:
Generate typescript types from json schemas
11 lines • 643 B
JavaScript
export const isAbsolute = (schemaRef) => hasProperties(schemaRef, true, true, true);
export const isRelative = (schemaRef) => hasProperties(schemaRef, false, true, true);
export const isLocal = (schemaRef) => hasProperties(schemaRef, false, false, false, true);
const hasProperties = (schemaRef, authority, folder, name, fragment) => {
const test = schemaRef;
return (authority === (test.authority !== undefined) &&
folder === (test.folder !== undefined) &&
name === (test.name !== undefined) &&
(fragment === undefined || fragment === (test.fragment !== undefined)));
};
//# sourceMappingURL=schema-refs.js.map