Registry / testing / amanda

amanda

JSON →
library1.0.1jsnpmunverified

Amanda is a JSON Schema validator library for Node.js and the browser, supporting JSON Schema Internet Draft v3. It is designed to be universal and extensible, with plans to support other schema formats. Version 1.0.1 is the latest stable release; the library is lightweight, has no dependencies, works with AMD loaders like RequireJS, and is primarily synchronous with callback-based validation. Unlike modern validators like Ajv, Amanda follows older draft specifications and does not support newer JSON Schema versions.

npm install amanda
INSTALL
IMPORT
SIG · AMANDA
A
amanda
testingjavascriptv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

amanda
import amanda from 'amanda'
const amanda = require('amanda').default
Default ESM import works as the module exports a function directly.
amanda
const amanda = require('amanda')
CommonJS require works directly as the module uses module.exports.
jsonSchemaValidator
const jsonSchemaValidator = amanda('json')
const jsonSchemaValidator = amanda.json()
Call amanda with the type string 'json' to get a JSON Schema validator instance.

Shows how to create a JSON Schema validator instance and validate an object against a schema using the callback pattern.

import amanda from 'amanda'; const schema = { type: 'object', properties: { name: { required: true, type: 'string' } } }; const data = { name: 'Kenneth' }; const jsonSchemaValidator = amanda('json'); jsonSchemaValidator.validate(data, schema, (error) => { if (error) { console.error('Validation failed:', error); } else { console.log('Valid!'); } });
Debug
Known issues
deprecatedAmanda supports only JSON Schema Internet Draft v3 (draft-zyp-json-schema-03), which is outdated. Use Ajv or other modern validators for newer drafts.
fix
Migrate to Ajv (https://ajv.js.org/) which supports JSON Schema draft-04 and later.
affects: >=0.0.0
gotchaThe validate method uses a callback with a single error argument; it does not return a promise or support async/await natively.
fix
Wrap in a Promise or use a callback pattern.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: amanda is not a function
Using default import in a CommonJS environment without proper transpilation.
fix
Use const amanda = require('amanda') instead of import amanda from 'amanda'.
amanda(...) is not a function
Calling amanda without a type string or with an invalid type.
fix
Ensure you call amanda('json') with the string 'json'.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
46 hits · last 30 days
node
36
OpenAI (training)
1
Resources
packageamanda
amanda — npm install amanda · libregistry