UNPKG

markpage

Version:

Build and manage markdown-based content with distributed navigation - framework agnostic content management system

12 lines (11 loc) 750 B
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); function validateDocItem(item) { return typeof item === "object" && item !== null && typeof item.name === "string" && item.name.length > 0 && (item.type === "section" || item.type === "page") && typeof item.label === "string" && item.label.length > 0 && (item.collapsed === void 0 || typeof item.collapsed === "boolean") && (item.url === void 0 || typeof item.url === "string"); } function validateIndexFile(data) { return typeof data === "object" && data !== null && Array.isArray(data.items) && data.items.every(validateDocItem); } exports.validateDocItem = validateDocItem; exports.validateIndexFile = validateIndexFile; //# sourceMappingURL=types.cjs.map