Socket
Socket
Sign inDemoInstall

har-validator

Package Overview
Dependencies
7
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

har-validator

Extremely fast HTTP Archive (HAR) validator using JSON Schema

    5.1.5latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
14,989,275
increased by5.74%

Weekly downloads

Package description

What is har-validator?

The har-validator npm package is a library designed to validate HTTP Archive (HAR) files. HAR files are JSON-formatted archives that track all the logging of a web browser's interaction with a site. This package ensures that HAR files adhere to the specification and structure expected, making it useful for developers working with web performance and debugging, API testing, and network monitoring.

What are har-validator's main functionalities?

HAR file validation

This feature allows developers to validate HAR files against the HAR format specification. The code sample demonstrates how to use the har-validator package to validate a HAR file. If the file is valid, it logs a success message; otherwise, it catches and logs the validation error.

const HARValidator = require('har-validator');

async function validateHAR(harData) {
  try {
    const valid = await HARValidator.har(harData);
    console.log('HAR is valid:', valid);
  } catch (err) {
    console.error('HAR validation error:', err.message);
  }
}

Other packages similar to har-validator

Readme

Source

HAR Validator

license version super linter test release

Extremely fast HTTP Archive (HAR) validator using JSON Schema.

Install

npm install har-validator

CLI Usage

Please refer to har-cli for more info.

API

Note: as of v2.0.0 this module defaults to Promise based API. For backward compatibility with v1.x an async/callback API is also provided

Keywords

FAQs

Last updated on 30 Jul 2020

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc