src/plugin.js
/**
   * Validate the given CloudEvent with the schema compiler already instanced.
   *
   * @param {!object} event the CloudEvent to serialize
   * @return {object} validation results: 'valid' boolean and 'errors' as array of strings or null
   * @throws {Error} if event is undefined or null
   */
Validate the given CloudEvent with the schema compiler already instanced.

@param {!object} event the CloudEvent to serialize
@return {object} validation results: 'valid' boolean and 'errors' as array of strings or null
@throws {Error} if event is undefined or null
Validate the given CloudEvent with the schema compiler already instanced . @param { !object } event the CloudEvent to serialize @return { object } validation results : ' valid ' boolean and ' errors ' as array of strings or null @throws { Error } if event is undefined or null
function validate (event) {
    ensureIsObjectPlain(event, 'event')
    const isValid = validateFromSchema(event)
    return {
      valid: isValid,
      errors: validateFromSchema.errors
    }
  }
function validate ( event ) { ensureIsObjectPlain ( event , 'event' ) const isValid = validateFromSchema ( event ) return { valid : isValid , errors : validateFromSchema . errors } }
Validate the given CloudEvent with the schema compiler already instanced.
Validate the given CloudEvent with the schema compiler already instanced .