Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 2, 2024 via pnpm
Package summary
Share
4
issues
1
high severity
license
1
2
moderate severity
vulnerability
2
1
low severity
license
1
2
licenses
17
MIT
1
Public Domain
Package created
29 May 2015
Version published
28 Apr 2017
Maintainers
2
Total deps
18
Direct deps
2
License
MIT

Issues

4

1 high severity issue

high
Recommendation: Validate that the package complies with your license policy
via: json-stable-stringify@1.1.1
Collapse
Expand

2 moderate severity issues

moderate
Recommendation: Upgrade to version 6.12.3 or later
via: ajv@4.11.8
Recommendation: Upgrade to version 6.12.3 or later
via: ajv@4.11.8
Collapse
Expand

1 low severity issue

low
Recommendation: Read and validate the license terms
via: json-stable-stringify@1.1.1
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
17 Packages, Including:
ajv@4.11.8
call-bind@1.0.7
co@4.6.0
define-data-property@1.1.4
es-define-property@1.0.0
es-errors@1.3.0
function-bind@1.1.2
get-intrinsic@1.2.4
gopd@1.0.1
has-property-descriptors@1.0.2
has-proto@1.0.3
has-symbols@1.0.3
hasown@2.0.1
isarray@2.0.5
json-stable-stringify@1.1.1
object-keys@1.1.1
set-function-length@1.2.1

Public Domain

Invalid
Not OSI Approved
1 Packages, Including:
jsonify@0.0.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of ajv 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
co4.6.05.74 kBMIT
prod
json-stable-stringify1.1.19.17 kBMIT
prod
1
1

Visualizations

Frequently Asked Questions

What does ajv do?

Ajv, short for Another JSON Schema Validator, is a powerful JSON validator for Node.js and browsers. It is acknowledged as one of the fastest JSON validators as it converts JSON Schemas into super-fast validation functions optimized for v8 JavaScript engine. Ajv supports all validation keywords of JSON Schema draft-04/06/07/2019-09/2020-12, provides full support of remote references, ensures correct string lengths for unicode pairs, allows asynchronous loading of referenced schemas and many more advanced features. Notably, it also offers Ajv i18n package for internationalized error messages.

How do you use ajv?

To use Ajv, first ensure you have it installed in your project by running npm install ajv in your command line terminal. Once installed, import the Ajv module and create an instance of it. You can then use compile method to create a validation function from your JSON schema. After the validation function is generated, you can validate your data using this function. Example usage in JavaScript is as follows:

import Ajv from "ajv";

const ajv = new Ajv();

const schema = {
  type: "object",
  properties: {
    foo: {type: "integer"},
    bar: {type: "string"},
  },
  required: ["foo"],
  additionalProperties: false,
};

const data = {
  foo: 1,
  bar: "abc",
};

const validate = ajv.compile(schema);
const valid = validate(data);

if (!valid) console.log(validate.errors);

In this example, a data object is tested against the defined schema. The valid constant returns true if data is valid against the schema or false otherwise. If data is invalid, the validation errors can be obtained from validate.errors.

Where are the ajv docs?

All documentation needed to utilize Ajv to its full potential can be found on the Ajv website. Useful links on the website include the "Getting started" guide, API reference, FAQ, and more advanced topics like security considerations, standalone validation code, strict mode, and JSON Schema vs JSON Type Definition comparison.