Skip to main content

Framework-agnostic · TypeScript-first

Shape API data for the code that uses it.

ShapeWire is a type-safe transformation layer between external data and your application. Turn inconsistent responses into clean models with small functions that compose.

Transformation workbench

One boundary. One reusable function.

  • Immutable
  • Synchronous
  • Typed
01

API response

const apiUser = {  user_id: 7,  full_name: 'Ada',  balance: '12.50',  verified: 'yes',};
02

ShapeWire pipeline

const toUser = pipe(  rename({    user_id: 'id',    full_name: 'name',  }),  defaults({ role: 'viewer' }),  normalize({    balance: 'number',    verified: 'boolean',  }),);
const user = toUser(apiUser);
03

Application model

{  id: 7,  name: 'Ada',  balance: 12.5,  verified: true,  role: 'viewer',}

Your data boundary, made explicit.

APIs optimize data for transport. Applications need stable shapes. ShapeWire cleans, reshapes, filters, fills, merges, and maps data before it reaches UI, state, services, or server code.

It transforms data. It does not fetch it, render UI, validate business rules, or require a state library.

Use the same plain function anywhere JavaScript runs.
  • React
  • Vue
  • Svelte
  • Node.js
  • Workers

Handle the messy parts once.

Shape objects

Rename, pick, omit, default, merge, or target a nested object without changing the source response.

rename · pick · omit · defaults · merge · at

Normalize values

Turn inconsistent dates, numbers, booleans, currencies, and domain values into predictable types.

normalize · built-ins · custom callbacks

Compose once

Build one readable transform, reuse it for objects or lists, and keep transport details out of application code.

pipe · mapEach · inferred output