lib/jsonscript.js
function addAjvKeywords() {
  addAjvKeyword.call(this, 'validateAsync');
  addAjvKeyword.call(this, 'itemsSerial', 'array');
  this._evalKeywords.objectToAsync = util.objectToPromise;
  this._evalKeywords.valueToAsync = util.toPromise;
  addAjvKeyword.call(this, 'objectToAsync', 'object', true);
  addAjvKeyword.call(this, 'valueToAsync', undefined, true);
  this.ajv.addKeyword('resolvePendingRefs', {
    validate: evaluationKeywords.resolvePendingRefs,
    schema: false
  });
  this.ajv.addKeyword('expandJsMacro', {
    compile: compileExpandJsMacro
  });
}
function addAjvKeywords() {
  addAjvKeyword.call(this, 'validateAsync');
  addAjvKeyword.call(this, 'itemsSerial', 'array');
  this._evalKeywords.objectToAsync = util.objectToPromise;
  this._evalKeywords.valueToAsync = util.toPromise;
  addAjvKeyword.call(this, 'objectToAsync', 'object', true);
  addAjvKeyword.call(this, 'valueToAsync', undefined, true);
  this.ajv.addKeyword('resolvePendingRefs', {
    validate: evaluationKeywords.resolvePendingRefs,
    schema: false
  });
  this.ajv.addKeyword('expandJsMacro', {
    compile: compileExpandJsMacro
  });
}
function addAjvKeywords ( ) { addAjvKeyword . call ( this , 'validateAsync' ) ; addAjvKeyword . call ( this , 'itemsSerial' , 'array' ) ; this . _evalKeywords . objectToAsync = util . objectToPromise ; this . _evalKeywords . valueToAsync = util . toPromise ; addAjvKeyword . call ( this , 'objectToAsync' , 'object' , true ) ; addAjvKeyword . call ( this , 'valueToAsync' , undefined , true ) ; this . ajv . addKeyword ( 'resolvePendingRefs' , { validate : evaluationKeywords . resolvePendingRefs , schema : false } ) ; this . ajv . addKeyword ( 'expandJsMacro' , { compile : compileExpandJsMacro } ) ; }
private function to add Ajv keywords that are used in the schema that evaluates scripts
@this JSONScript
private function to add Ajv keywords that are used in the schema that evaluates scripts