@trapi/metadata
Version:
Generate REST-API metadata scheme from TypeScript Decorators.
18 lines • 668 B
JavaScript
;
/*
* Copyright (c) 2023.
* Author Peter Placzek (tada5hi)
* For the full copyright and license information,
* view the LICENSE file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPresetSchema = void 0;
const locter_1 = require("locter");
function isPresetSchema(input) {
return (0, locter_1.isObject)(input) &&
(0, locter_1.hasOwnProperty)(input, 'items') &&
Array.isArray(input.items) &&
(!(0, locter_1.hasOwnProperty)(input, 'extends') || Array.isArray(input.extends));
}
exports.isPresetSchema = isPresetSchema;
//# sourceMappingURL=check.js.map