import * as validate from 'har-validator'
import * as validate from 'har-validator/lib/promise'
import { request, response } from 'har-validator/lib/promise'
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a afterRequest" objects
validate.afterRequest(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a "beforeRequest" objects
validate.beforeRequest(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a browser object
validate.browser(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a cache object
validate.cache(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a content object
validate.content(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a cookie object
validate.cookie(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a creator object
validate.creator(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) an entry object
validate.entry(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a full HAR object
validate.har(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a header object
validate.header(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a log object
validate.log(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a page object
validate.page(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a pageTimings object
validate.pageTimings(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a postData object
validate.postData(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a queryString object
validate.query(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a request object
validate.request(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a response object
validate.cacheEntry(data)
.then((data) => console.log('✔️'))
.catch(console.error)
Returns a promise that resolves to the valid object.
- data:
Object
(Required) a timings object
validate.timings(data)
.then((data) => console.log('✔️'))
.catch(console.error)