0.1.1 • Published 5 months ago

@wingriders/datum-explorer-lib v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Datum Explorer Library

Datum Explorer is an open-source library designed to decode, understand, and build with CBOR (Concise Binary Object Representation) data. The library simplifies working with CBOR by leveraging schema definitions to provide a more human-readable and structured representation of the data.

Features

  • CBOR Parsing: Parses CBOR data using CDDL schema.
  • CDDL Validation: Validates CDDL schema files and checks for unsupported features.

Get started

npm

npm install @wingriders/datum-explorer-lib

pnpm

pnpm add @wingriders/datum-explorer-lib

yarn

yarn add @wingriders/datum-explorer-lib

Usage

Parsing CBOR with a CDDL schema

To parse CBOR data using a specified CDDL schema file:

import {parseCbor} from '@wingriders/datum-explorer-lib'

const result = await parseCbor('<CDDL schema file contents>', '<Raw CBOR string>')
console.log(result)

Validating CDDL schema and checking unsupported features

To validate specified CDDL schema file and check unsupported features:

import {validateCddl} from '@wingriders/datum-explorer-lib'

// Throws an error if the schema is invalid or is using unsupported features
await validateCddl('<CDDL schema file contents>')
0.1.1

5 months ago

0.1.0

5 months ago