source: imaps-frontend/node_modules/ajv-keywords/dist/definitions/_util.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 773 bytes
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.usePattern = exports.metaSchemaRef = void 0;
4const codegen_1 = require("ajv/dist/compile/codegen");
5const META_SCHEMA_ID = "http://json-schema.org/schema";
6function metaSchemaRef({ defaultMeta } = {}) {
7 return defaultMeta === false ? {} : { $ref: defaultMeta || META_SCHEMA_ID };
8}
9exports.metaSchemaRef = metaSchemaRef;
10function usePattern({ gen, it: { opts } }, pattern, flags = opts.unicodeRegExp ? "u" : "") {
11 const rx = new RegExp(pattern, flags);
12 return gen.scopeValue("pattern", {
13 key: rx.toString(),
14 ref: rx,
15 code: (0, codegen_1._) `new RegExp(${pattern}, ${flags})`,
16 });
17}
18exports.usePattern = usePattern;
19//# sourceMappingURL=_util.js.map
Note: See TracBrowser for help on using the repository browser.