Async version of json-schema-traverse that iterates over all schema objects in a JSON Schema document, invoking a callback (or pre/post callbacks) for each object. Version 1.0.1 supports both CommonJS and ESM, ships TypeScript types, and is a maintained fork of json-schema-traverse with async/await support. Key differentiator: works with promises for asynchronous traversal, while the original is synchronous. Suitable for JSON Schema processing pipelines that require async operations.
npm install async-json-schema-traverseNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates traversing a JSON Schema with async/await, both single callback and pre/post callbacks.
Use a separate JSON Schema resolver (e.g., ajv) if you need $ref resolution.
Check schema type before traversal; boolean schemas are not passed to callback.
Use named parameters or destructure carefully to avoid confusion.
Provide an object: { pre: preCallback, post: postCallback }.Use import traverse from 'async-json-schema-traverse' or const traverse = require('async-json-schema-traverse')npm install async-json-schema-traverse (types are bundled). Ensure tsconfig.json includes 'node' module resolution.
Provide cb: callbackFunction or cb: { pre: preFn, post: postFn }No dependency data recorded yet.