A JSON Schema validator supporting a subset of JSON Schema v4 (draft 4). Version 0.6.1 is the latest stable release. It allows building schemas via method chaining or from plain JSON objects, and provides validation with detailed error objects. Key differentiators: lightweight, no dependencies, simple API. However, it has significant limitations: no union types, limited array/object additionalItems/Properties, no patternProperties, no dependencies, no $ref resolution beyond definitions, and no 'not' support. It is currently in maintenance mode with no recent updates.
npm install jskiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a validator using method chaining, validates an object, and logs errors if any.
Use a different validator like ajv if you need full JSON Schema v4/v7 support.
If you need schema-based additionalItems, use ajv or another validator.
Provide definitions explicitly in the options or use .definitions() on the schema.
Migrate to ajv (https://www.npmjs.com/package/ajv).
Use ajv if your schema uses these features.
Use const J = require('jski')() or const factory = require('jski'); const J = factory();Ensure you build a schema first: const schema = J.number(); schema.validate(value);
Make sure all property schemas are defined: J.object({ foo: J.string() })No dependency data recorded yet.