← back to log

Introducing the c28n transform DSL

Today we're sharing early docs for the c28n transform DSL. Chain, compose, and debug data normalization rules with zero boilerplate. An interactive playground is coming soon.

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

  1. No new syntax to learn. It’s just functions. If you know map and filter, you know the transform DSL.
  2. Composable by default. Chain transforms. Nest them. Reuse them across schemas.
  3. 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.