"Fossies" - the Fresh Open Source Software Archive

Member "node-v12.18.4-win-x86/node_modules/npm/node_modules/ajv/lib/dot/defaults.def" (14 Feb 2020, 891 Bytes) of package /windows/www/node-v12.18.4-win-x86.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.assignDefault:
    2   if ({{=$passData}} === undefined)
    3     {{=$passData}} = {{? it.opts.useDefaults == 'shared' }}
    4                        {{= it.useDefault($sch.default) }}
    5                      {{??}}
    6                        {{= JSON.stringify($sch.default) }}
    7                      {{?}};
    8 #}}
    9 
   10 
   11 {{## def.defaultProperties:
   12   {{
   13     var $schema = it.schema.properties
   14       , $schemaKeys = Object.keys($schema); }}
   15   {{~ $schemaKeys:$propertyKey }}
   16     {{ var $sch = $schema[$propertyKey]; }}
   17     {{? $sch.default !== undefined }}
   18       {{ var $passData = $data + it.util.getProperty($propertyKey); }}
   19       {{# def.assignDefault }}
   20     {{?}}
   21   {{~}}
   22 #}}
   23 
   24 
   25 {{## def.defaultItems:
   26   {{~ it.schema.items:$sch:$i }}
   27     {{? $sch.default !== undefined }}
   28       {{ var $passData = $data + '[' + $i + ']'; }}
   29       {{# def.assignDefault }}
   30     {{?}}
   31   {{~}}
   32 #}}