@revisium/schema-toolkit
v0.13.0
Published
Universal schema toolkit with TypeScript types and utilities for JSON Schema manipulation
Maintainers
Readme
@revisium/schema-toolkit
Framework-agnostic TypeScript types, system schemas, runtime stores, and utilities for working with JSON Schema in Revisium projects.
Installation
npm install @revisium/schema-toolkitAPI
Schema
| Function | Description |
|----------|-------------|
| createJsonSchemaStore | Create runtime schema store |
| getJsonSchemaStoreByPath | Navigate schema by path |
| applyPatches | Apply JSON Patch operations to schema |
| resolveRefs | Resolve $ref to inline schemas |
| validateJsonFieldName | Validate field name format |
| getInvalidFieldNamesInSchema | Find invalid field names in schema |
Value
| Function | Description |
|----------|-------------|
| createJsonValueStore | Create runtime value store |
| getJsonValueByPath | Navigate value by path |
| computeValueDiff | Compute field-level diff between two values |
| traverseValue | Traverse value tree |
Foreign Keys
| Function | Description |
|----------|-------------|
| getForeignKeysFromSchema | Extract foreign keys from schema |
| getForeignKeysFromValue | Extract foreign key values from data |
| getForeignKeyPatchesFromSchema | Get patches for foreign key changes |
| replaceForeignKeyValue | Replace foreign key references |
Path Utils
| Function | Description |
|----------|-------------|
| parsePath | Parse dot-notation path to segments |
| getParentForPath | Get parent path |
| getPathByStore | Get path from store |
| deepEqual | Deep equality comparison |
License
MIT
