@clementine-solutions/jane-io
v1.0.12
Published
A clarity-first boundary system for shaping, validating, and transforming data with full introspection and policy control.
Maintainers
Readme
Jane-IO
A clarity-first boundary system for shaping, validating, and transforming data with full introspection and policy control.
Jane-IO is a TypeScript-first data validation library that emphasizes explicit design, runtime safety, and comprehensive observability. Unlike traditional validators, Jane treats data processing as a multi-stage pipeline with policy-driven decision making.
Key Features
- Security-First: Built-in protection against prototype pollution, circular references, and unsafe Unicode
- Type-Safe: Full TypeScript coverage with immutable, composable APIs
- Observable: Rich telemetry, diff tracking, and audit trails
- Configurable: Policy-driven behavior with multiple validation modes
- Performant: Lazy evaluation and efficient data structures
- Extensible: Plugin architecture for custom validators and parsers
Installation
npm install @clementine-solutions/jane-ioyarn add @clementine-solutions/jane-iopnpm add @clementine-solutions/jane-ioQuick Start
import { jane } from '@clementine-solutions/jane-io';
// Simple validation
const result = await jane.value(37)
.parse("numeric")
.integer()
.min(21)
.run();
if (result.ok) {
console.log("Valid email:", result.value);
} else {
console.log("Issues:", result.issues);
}Documentation
Use Cases
Jane excels at:
- API Data Validation: Secure processing of external inputs.
- Configuration Management: Structured config validation with audit trails.
- Data Transformation Pipelines: ETL workflows with error tracking.
- Form Validation: Complex multi-field validation scenarios.
- Data Import/Export: Safe handling of structured data.
Architecture
Jane's pipeline processes data through distinct stages:
graph LR
A[Raw Input] --> B[Contain]
B --> C[Scan]
C --> D[Normalize]
D --> E[Parse]
E --> F[Validate]
F --> G[Policy]
G --> H[Result]- Contain: Structural safety and sanitization.
- Scan: Analysis and hazard detection.
- Normalize: Data hygiene and standardization.
- Parse: Semantic interpretation.
- Validate: Business rule enforcement.
- Policy: Decision-making and observability.
Security Features
- Structural Hazard Detection: Identifies circular references, excessive depth, and unsafe structures.
- Unicode Safety: Detects and handles bidirectional control characters.
- Prototype Pollution Prevention: Safe property access and key filtering.
- Containment Sentinels: Safe representation of dangerous values.
- Immutable Processing: No side effects or data mutation.
Observability
Jane provides comprehensive introspection:
const result = await jane.value(data)
.withDiff() // Track changes
.withExplain() // Explain decisions
.withReplay() // Reconstruct transformations
.withTelemetry(sink) // Custom telemetry
.run();
// Access detailed metadata
console.log(result.metadata);
console.log(result.diff);
console.log(result.explain);License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Acknowledgments
Jane IO is built with care for the developer experience and runtime safety. Special thanks to the TypeScript community and the broader JavaScript ecosystem for inspiration and tooling.
Support
- Issues: GitLab Issues
- Discussions: GitLab Discussions
- Documentation: Jane IO Docs
Jane IO - Observable data validation with clarity and confidence.
