Urara-Blog/node_modules/.pnpm-store/v3/files/1a/4cd5ec476ee5bada5e6c1f3a912823c952422af9c0bb027059ccb983a0cf25a6092e8780d09cf7184d7e7908d2d8d7f8b03d9209a04ad05a620713e07ec4fd
2022-08-14 01:14:53 +08:00

26 lines
No EOL
918 B
Text

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRules = exports.isJSONType = void 0;
const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"];
const jsonTypes = new Set(_jsonTypes);
function isJSONType(x) {
return typeof x == "string" && jsonTypes.has(x);
}
exports.isJSONType = isJSONType;
function getRules() {
const groups = {
number: { type: "number", rules: [] },
string: { type: "string", rules: [] },
array: { type: "array", rules: [] },
object: { type: "object", rules: [] },
};
return {
types: { ...groups, integer: true, boolean: true, null: true },
rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object],
post: { rules: [] },
all: {},
keywords: {},
};
}
exports.getRules = getRules;
//# sourceMappingURL=rules.js.map