({ gen, it: { opts } }, pattern)
| 5506 | exports.callValidateCode = callValidateCode; |
| 5507 | const newRegExp = (0, codegen_1._) `new RegExp`; |
| 5508 | function usePattern({ gen, it: { opts } }, pattern) { |
| 5509 | const u = opts.unicodeRegExp ? "u" : ""; |
| 5510 | const { regExp } = opts.code; |
| 5511 | const rx = regExp(pattern, u); |
| 5512 | return gen.scopeValue("pattern", { |
| 5513 | key: rx.toString(), |
| 5514 | ref: rx, |
| 5515 | code: (0, codegen_1._) `${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`, |
| 5516 | }); |
| 5517 | } |
| 5518 | exports.usePattern = usePattern; |
| 5519 | function validateArray(cxt) { |
| 5520 | const { gen, data, keyword, it } = cxt; |
nothing calls this directly
no test coverage detected