Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
har-validator-fsless
Advanced tools
Extremely fast HTTP Archive (HAR) validator using JSON Schema
Extremely fast HTTP Archive (HAR) validator using JSON Schema.
# to use in cli
npm install --global har-validator
# to use as a module
npm install --save har-validator
Usage: har-validator [options] <files ...>
Options:
-h, --help output usage information
-V, --version output the version number
-s, --schema [name] validate schema name (log, request, response, etc ...)
har-validator har.json
har-validator --schema request request.json
Returns true
or false
.
data: Object
(Required)
a full HAR object
callback: Function
gets two arguments (err, valid)
var HAR = require('./har.json');
var validate = require('har-validator');
validate(HAR, function (e, valid) {
if (e) console.log(e.errors)
if (valid) console.log('horray!');
});
Returns true
or false
.
data: Object
(Required)
a log object
callback: Function
gets two arguments (err, valid)
var validate = require('har-validator');
validate.log(data, function (e, valid) {
if (e) console.log(e.errors)
});
Returns true
or false
.
data: Object
(Required)
a cache object
callback: Function
gets two arguments (err, valid)
var validate = require('har-validator');
validate.cache(data, function (e, valid) {
if (e) console.log(e.errors)
});
Returns true
or false
.
data: Object
(Required)
a "beforeRequest" or "afterRequest" objects
callback: Function
gets two arguments (err, valid)
var validate = require('har-validator');
validate.cacheEntry(data, function (e, valid) {
if (e) console.log(e.errors)
});
Returns true
or false
.
data: Object
(Required)
a content object
callback: Function
gets two arguments (err, valid)
var validate = require('har-validator');
validate.content(data, function (e, valid) {
if (e) console.log(e.errors)
});
Returns true
or false
.
data: Object
(Required)
a cookie object
callback: Function
gets two arguments (err, valid)
var validate = require('har-validator');
validate.cookie(data, function (e, valid) {
if (e) console.log(e.errors)
});
Returns true
or false
.
data: Object
(Required)
a creator object
callback: Function
gets two arguments (err, valid)
var validate = require('har-validator');
validate.creator(data, function (e, valid) {
if (e) console.log(e.errors)
});
Returns true
or false
.
data: Object
(Required)
a entry object
callback: Function
gets two arguments (err, valid)
var validate = require('har-validator');
validate.entry(data, function (e, valid) {
if (e) console.log(e.errors)
});
alias of Validate(data [, callback])
Returns true
or false
.
data: Object
(Required)
a page object
callback: Function
gets two arguments (err, valid)
var validate = require('har-validator');
validate.page(data, function (e, valid) {
if (e) console.log(e.errors)
});
Returns true
or false
.
data: Object
(Required)
a pageTimings object
callback: Function
gets two arguments (err, valid)
var validate = require('har-validator');
validate.pageTimings(data, function (e, valid) {
if (e) console.log(e.errors)
});
Returns true
or false
.
data: Object
(Required)
a postData object
callback: Function
gets two arguments (err, valid)
var validate = require('har-validator');
validate.postData(data, function (e, valid) {
if (e) console.log(e.errors)
});
Returns true
or false
.
data: Object
(Required)
a record object
callback: Function
gets two arguments (err, valid)
var validate = require('har-validator');
validate.record(data, function (e, valid) {
if (e) console.log(e.errors)
});
Returns true
or false
.
data: Object
(Required)
a request object
callback: Function
gets two arguments (err, valid)
var validate = require('har-validator');
validate.request(data, function (e, valid) {
if (e) console.log(e.errors)
});
Returns true
or false
.
data: Object
(Required)
a response object
callback: Function
gets two arguments (err, valid)
var validate = require('har-validator');
validate.cacheEntry(data, function (e, valid) {
if (e) console.log(e.errors)
});
Returns true
or false
.
data: Object
(Required)
a timings object
callback: Function
gets two arguments (err, valid)
var validate = require('har-validator');
validate.timings(data, function (e, valid) {
if (e) console.log(e.errors)
});
FAQs
Extremely fast HTTP Archive (HAR) validator using JSON Schema
The npm package har-validator-fsless receives a total of 2,499 weekly downloads. As such, har-validator-fsless popularity was classified as popular.
We found that har-validator-fsless demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.