New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

yajbe-dataformat

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yajbe-dataformat

YAJBE is a compact binary data format built to be a drop-in replacement for JSON (JavaScript Object Notation).

latest
Source
npmnpm
Version
1.0.6
Version published
Maintainers
1
Created
Source

YAJBE npm package for Javascript/Typescript

YAJBE is a compact binary data format built to be a drop-in replacement for JSON (JavaScript Object Notation).

Install

$ npm install yajbe-dataformat
$ cat package.json
...
"dependencies": {
  "yajbe-dataformat": "^1.0.0",
  ...
},

Usage & Examples

A simple example using deno remote import is below. but you can use local import as usual.

import * as YAJBE from 'yajbe-dataformat';

const enc: Uint8Array = YAJBE.encode({a: "hello", b: [1, 2, 3]});
const dec = YAJBE.decode(enc); // {a: "hello", b: [1, 2, 3]}

Supported Types

Aside from the basic types supported by JSON.stringify(), YAJBE.encode() also support Map, Set, Uint8Array and the others ArrayBufferView.

TODO

Some things are not supported yet by the implementation.

  • Decode variable length float
  • Encode/Decode BigInt
  • Encode/Decode BigDecimal
  • Handle number > MAX_SAFE as BigInt?

Keywords

yajbe

FAQs

Package last updated on 11 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts