
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
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 4,374 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.