Data normalization is tedious. You write the same coercion logic over and over. Convert this string to an integer. Parse that timestamp. Flatten this nested object. It’s the kind of code that makes you question your career choices.
Today we’re releasing early documentation for the c28n transform DSL — a tiny, composable language for data transformations.
Design Principles
- No new syntax to learn. It’s just functions. If you know
mapandfilter, you know the transform DSL. - Composable by default. Chain transforms. Nest them. Reuse them across schemas.
- Debuggable. Every transform records its input, output, and any errors. When a transformation fails, you know exactly why.
Example
const userSchema = c28n.define({
fields: {
id: c28n.string().uuid(),
created: c28n.timestamp().coerce('iso8601'),
profile: c28n.object({
name: c28n.string().trim().required(),
age: c28n.number().positive().optional()
})
}
});
That’s it. No classes. No builders. No ceremony. Just functions that describe what your data should look like.
What’s Next
An interactive playground is coming in v0.2. You’ll be able to paste sample data, define transformations, and see the results in real-time. We’re also working on first-class TypeScript support — types inferred from your schema definitions.
The full docs are live at docs.c28n.sh. Give it a try and let us know what breaks.