open-index/open-npm huggingface dataset:
npm package: @knot0/validator
Description: Lightweight JSON Schema validator for Knot0 v2 manifests using AJV.
Latest version: 2.0.34

# @knot0/validator

Lightweight JSON Schema validator for Knot0 v2 manifests using AJV.

Usage
```bash
# Build schemas first
node knot0-src/schemas-v2/scripts/build.mjs

# Run quick test
node knot0-src/packages-v2/validator-js/src/test.mjs
```

Programmatic
```js
import { createValidator } from '@knot0/validator';

const { validate } = createValidator();
const res = validate('Component', manifestObject);
if (!res.ok) console.error(res.errors);
```

Notes
- Looks up schemas at `knot0-src/schemas-v2/json` and uses `$id` = `https://knot0.com/schema/v2/<Kind>.json`.
- Schemas must be built before validation.