aka-worker/cool-dawn-3d3b/node_modules/capnp-ts
2023-09-12 00:20:38 +02:00
..
src Initial commit (by create-cloudflare CLI) 2023-09-12 00:20:38 +02:00
CHANGELOG.md Initial commit (by create-cloudflare CLI) 2023-09-12 00:20:38 +02:00
package.json Initial commit (by create-cloudflare CLI) 2023-09-12 00:20:38 +02:00
README.md Initial commit (by create-cloudflare CLI) 2023-09-12 00:20:38 +02:00
tsconfig.json Initial commit (by create-cloudflare CLI) 2023-09-12 00:20:38 +02:00

capnp-ts

A strongly typed Cap'n Proto implementation for the browser and Node.js using TypeScript.

Here's a quick usage example:

import * as capnp from 'capnp-ts';

import {MyStruct} from './myschema.capnp';

export function loadMessage(buffer: ArrayBuffer): MyStruct {

  const message = capnp.Message.fromArrayBuffer(buffer);

  return message.getRoot(MyStruct);

}

An extended readme is available on the project site: https://github.com/jdiaz5513/capnp-ts.