The format that's super!
README.md

The Duper logo, with a confident spectacled mole wearing a flailing blue cape.

@duper-js/wasm

PyPI version GitHub license

Duper support for Node.JS.

Check out the official website for Duper.

Installation #

npm install --save @duper-js/node

Examples #

import { parse, stringify } from "@duper-js/node";

const duper_data = `
APIResponse({
  status: 200,
  headers: {
    content_type: "application/duper",
    cache_control: "max-age=3600",
  },
  body: {
    users: [
      User({
        id: Uuid("7039311b-02d2-4849-a6de-900d4dbe9acb"),
        name: "Alice",
        email: Email("alice@example.com"),
        roles: ["admin", "user"],
        metadata: {
          last_login: Instant('2024-01-15T10:30:00Z'),
          ip: IPV4("173.255.230.79"),
        },
      }),
    ],
  },
})
`;

const obj = parse(duper_data);

console.log(stringify, { stripIdentifiers: false });
console.log(JSON.stringify(obj));