diff options
| author | akiyamn | 2023-09-24 23:22:21 +1000 |
|---|---|---|
| committer | akiyamn | 2023-09-24 23:22:21 +1000 |
| commit | 4e87195739f2a5d9a05451b48773c8afdc680765 (patch) | |
| tree | 9cba501844a4a11dcbdffc4050ed8189561c55ed /node_modules/capnp-ts/README.md | |
| download | price-tracker-worker-4e87195739f2a5d9a05451b48773c8afdc680765.tar.gz price-tracker-worker-4e87195739f2a5d9a05451b48773c8afdc680765.zip | |
Initial commit (by create-cloudflare CLI)
Diffstat (limited to 'node_modules/capnp-ts/README.md')
| -rw-r--r-- | node_modules/capnp-ts/README.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/node_modules/capnp-ts/README.md b/node_modules/capnp-ts/README.md new file mode 100644 index 0000000..a5c6723 --- /dev/null +++ b/node_modules/capnp-ts/README.md @@ -0,0 +1,21 @@ +# capnp-ts + +A strongly typed [Cap'n Proto](https://capnproto.org/) implementation for the browser and Node.js using TypeScript. + +Here's a quick usage example: + +```typescript +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](https://github.com/jdiaz5513/capnp-ts). |
