UNPKG

json-schema-typescript-generator

Version:
17 lines 860 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isLocal = exports.isRelative = exports.isAbsolute = void 0; const isAbsolute = (schemaRef) => hasProperties(schemaRef, true, true, true); exports.isAbsolute = isAbsolute; const isRelative = (schemaRef) => hasProperties(schemaRef, false, true, true); exports.isRelative = isRelative; const isLocal = (schemaRef) => hasProperties(schemaRef, false, false, false, true); exports.isLocal = isLocal; 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