UNPKG

charlike

Version:

Small, fast, simple and streaming project scaffolder for myself, but not only. Supports hundreds of template engines through the @JSTransformers API or if you want custom `render` function passed through options

25 lines (21 loc) 526 B
'use strict'; module.exports = function defFunc(ajv) { if (ajv.RULES.keywords.patternRequired) return console.warn('Keyword patternRequired is already defined'); defFunc.definition = { type: 'object', inline: require('./dotjs/patternRequired'), statements: true, errors: 'full', metaSchema: { type: 'array', items: { type: 'string', format: 'regex' }, uniqueItems: true } }; ajv.addKeyword('patternRequired', defFunc.definition); return ajv; };