install-nix-action/node_modules/ajv/lib/dot/pattern.jst
Domen Kožar 70742d22d9
v6
2019-11-19 17:50:30 +01:00

14 lines
348 B
Text

{{# def.definitions }}
{{# def.errors }}
{{# def.setupKeyword }}
{{# def.$data }}
{{
var $regexp = $isData
? '(new RegExp(' + $schemaValue + '))'
: it.usePattern($schema);
}}
if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) {
{{# def.error:'pattern' }}
} {{? $breakOnError }} else { {{?}}