BlueGit

blue-star danique-bot

Files

danique-bot / node_modules / ajv / lib / dot / pattern.jst

pattern.jst

Import template
timfa Tim · pushed by timfa · 4 years ago
c788ad20 History
pattern.jst 348 B Download Raw
1{{# def.definitions }}
2{{# def.errors }}
3{{# def.setupKeyword }}
4{{# def.$data }}
5
6{{
7 var $regexp = $isData
8 ? '(new RegExp(' + $schemaValue + '))'
9 : it.usePattern($schema);
10}}
11
12if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) {
13 {{# def.error:'pattern' }}
14} {{? $breakOnError }} else { {{?}}