"Fossies" - the Fresh Open Source Software Archive

Member "node-v12.18.4-win-x86/node_modules/npm/node_modules/ajv/lib/dot/enum.jst" (14 Feb 2020, 582 Bytes) of package /windows/www/node-v12.18.4-win-x86.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {{# def.definitions }}
    2 {{# def.errors }}
    3 {{# def.setupKeyword }}
    4 {{# def.$data }}
    5 
    6 {{
    7   var $i = 'i' + $lvl
    8     , $vSchema = 'schema' + $lvl;
    9 }}
   10 
   11 {{? !$isData }}
   12   var {{=$vSchema}} = validate.schema{{=$schemaPath}};
   13 {{?}}
   14 var {{=$valid}};
   15 
   16 {{?$isData}}{{# def.check$dataIsArray }}{{?}}
   17 
   18 {{=$valid}} = false;
   19 
   20 for (var {{=$i}}=0; {{=$i}}<{{=$vSchema}}.length; {{=$i}}++)
   21   if (equal({{=$data}}, {{=$vSchema}}[{{=$i}}])) {
   22     {{=$valid}} = true;
   23     break;
   24   }
   25 
   26 {{? $isData }}  }  {{?}}
   27 
   28 {{# def.checkError:'enum' }}
   29 
   30 {{? $breakOnError }} else { {{?}}