Initial React project

This commit is contained in:
Johan
2026-03-17 00:42:10 +01:00
parent c9031f2275
commit 8bca9680e4
1317 changed files with 48700 additions and 23334 deletions

View File

@@ -42,6 +42,11 @@ function compile(schema, root, localRefs, baseId) {
, defaultsHash = {}
, customRules = [];
function patternCode(i, patterns) {
var regExpCode = opts.regExp ? 'regExp' : 'new RegExp';
return 'var pattern' + i + ' = ' + regExpCode + '(' + util.toQuotedString(patterns[i]) + ');';
}
root = root || { schema: schema, refVal: refVal, refs: refs };
var c = checkCompiling.call(this, schema, root, baseId);
@@ -128,6 +133,7 @@ function compile(schema, root, localRefs, baseId) {
'equal',
'ucs2length',
'ValidationError',
'regExp',
sourceCode
);
@@ -141,7 +147,8 @@ function compile(schema, root, localRefs, baseId) {
customRules,
equal,
ucs2length,
ValidationError
ValidationError,
opts.regExp
);
refVal[0] = validate;
@@ -358,11 +365,6 @@ function compIndex(schema, root, baseId) {
}
function patternCode(i, patterns) {
return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
}
function defaultCode(i) {
return 'var default' + i + ' = defaults[' + i + '];';
}