Skip to content

Latest commit

 

History

History
204 lines (131 loc) · 4.33 KB

async.md

File metadata and controls

204 lines (131 loc) · 4.33 KB

async API

import * as validate from 'har-validator/lib/async'
import { request, response } from 'har-validator/lib/async'

validate.afterRequest(data)

Returns true or false.

let isValid = validate.afterRequest(data)

validate.beforeRequest(data)

Returns true or false.

let isValid = validate.beforeRequest(data)

validate.browser(data)

Returns true or false.

  • data: Object (Required) a browser object
let isValid = validate.browser(data)

validate.cache(data)

Returns true or false.

  • data: Object (Required) a cache object
let isValid = validate.cache(data)

validate.content(data)

Returns true or false.

  • data: Object (Required) a content object
let isValid = validate.content(data)

validate.cookie(data)

Returns true or false.

  • data: Object (Required) a cookie object
let isValid = validate.cookie(data)

validate.creator(data)

Returns true or false.

  • data: Object (Required) a creator object
let isValid = validate.creator(data)

validate.entry(data)

Returns true or false.

  • data: Object (Required) an entry object
let isValid = validate.entry(data)

validate.har(data)

Returns true or false.

  • data: Object (Required) a full HAR object
let isValid = validate.har(data)

validate.header(data)

Returns true or false.

  • data: Object (Required) a header object
let isValid = validate.header(data)

validate.log(data)

Returns true or false.

  • data: Object (Required) a log object
let isValid = validate.log(data)

validate.page(data)

Returns true or false.

  • data: Object (Required) a page object
let isValid = validate.page(data)

validate.pageTimings(data)

Returns true or false.

let isValid = validate.pageTimings(data)

validate.postData(data)

Returns true or false.

  • data: Object (Required) a postData object
let isValid = validate.postData(data)

validate.query(data)

Returns true or false.

let isValid = validate.query(data)

validate.request(data)

Returns true or false.

  • data: Object (Required) a request object
let isValid = validate.request(data)

validate.response(data)

Returns true or false.

  • data: Object (Required) a response object
let isValid = validate.cacheEntry(data)

validate.timings(data)

Returns true or false.

  • data: Object (Required) a timings object
let isValid = validate.timings(data)