"Fossies" - the Fresh Open Source Software Archive

Member "node-v12.18.4-win-x64/node_modules/npm/node_modules/ajv/lib/dot/missing.def" (14 Feb 2020, 1233 Bytes) of package /windows/www/node-v12.18.4-win-x64.zip:


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

    1 {{## def.checkMissingProperty:_properties:
    2   {{~ _properties:$propertyKey:$i }}
    3     {{?$i}} || {{?}}
    4     {{
    5       var $prop = it.util.getProperty($propertyKey)
    6         , $useData = $data + $prop;
    7     }}
    8     ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) )
    9   {{~}}
   10 #}}
   11 
   12 
   13 {{## def.errorMissingProperty:_error:
   14   {{
   15     var $propertyPath = 'missing' + $lvl
   16       , $missingProperty = '\' + ' + $propertyPath + ' + \'';
   17     if (it.opts._errorDataPathProperty) {
   18       it.errorPath = it.opts.jsonPointers
   19                       ? it.util.getPathExpr($currentErrorPath,  $propertyPath, true)
   20                       : $currentErrorPath + ' + ' + $propertyPath;
   21     }
   22   }}
   23   {{# def.error:_error }}
   24 #}}
   25 
   26 
   27 {{## def.allErrorsMissingProperty:_error:
   28   {{
   29     var $prop = it.util.getProperty($propertyKey)
   30       , $missingProperty = it.util.escapeQuotes($propertyKey)
   31       , $useData = $data + $prop;
   32     if (it.opts._errorDataPathProperty) {
   33       it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);
   34     }
   35   }}
   36   if ({{# def.noPropertyInData }}) {
   37     {{# def.addError:_error }}
   38   }
   39 #}}