Submit
Path:
~
/
/
usr
/
lib
/
node_modules
/
npm
/
node_modules
/
har-validator
/
node_modules
/
ajv
/
lib
/
File Content:
data.js
'use strict'; var KEYWORDS = [ 'multipleOf', 'maximum', 'exclusiveMaximum', 'minimum', 'exclusiveMinimum', 'maxLength', 'minLength', 'pattern', 'additionalItems', 'maxItems', 'minItems', 'uniqueItems', 'maxProperties', 'minProperties', 'required', 'additionalProperties', 'enum', 'format', 'const' ]; module.exports = function (metaSchema, keywordsJsonPointers) { for (var i=0; i<keywordsJsonPointers.length; i++) { metaSchema = JSON.parse(JSON.stringify(metaSchema)); var segments = keywordsJsonPointers[i].split('/'); var keywords = metaSchema; var j; for (j=1; j<segments.length; j++) keywords = keywords[segments[j]]; for (j=0; j<KEYWORDS.length; j++) { var key = KEYWORDS[j]; var schema = keywords[key]; if (schema) { keywords[key] = { anyOf: [ schema, { $ref: 'https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#' } ] }; } } } return metaSchema; };
Submit
FILE
FOLDER
Name
Size
Permission
Action
compile
---
0755
dot
---
0755
dotjs
---
0755
refs
---
0755
ajv.d.ts
13221 bytes
0644
ajv.js
15837 bytes
0644
cache.js
409 bytes
0644
data.js
1048 bytes
0644
definition_schema.js
872 bytes
0644
keyword.js
3911 bytes
0644
N4ST4R_ID | Naxtarrr