@sdbf/core
v0.0.0
Published
Public stub package for the @sdbf npm namespace. Mirrors the SDBF executable specification while the production implementation is in development.
Maintainers
Readme
@sdbf/core
Public placeholder package for the Schema Dictionary Binary Format (SDBF).
⚠️ Version
0.0.0only reserves the@sdbfnpm namespace. It re-exports the TypeScript executable specification and is not yet a stable production implementation.
Installation
npm install @sdbf/coreQuick example
import { Coder, SchemaType } from "@sdbf/core";
const coder = new Coder({
schema: {
type: SchemaType.Object,
extraFields: "strict",
fields: {
id: { type: SchemaType.U64, fixed: true, fixedSize: true },
name: { type: SchemaType.String, fixed: true, maxSize: 32 },
},
},
keyIdSize: 2,
});
const bytes = coder.encode({ id: 7n, name: "alice" });
const value = coder.decode(bytes);Repository
https://github.com/mr-amirka/SDBF
License
MIT
