Skip to content

A minimalistic, extensible MessagePack encoder and decoder for the web, supporting circular references. Built upon tiny-msgpack.

Notifications You must be signed in to change notification settings

maximilianMairinger/circMsgpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Circ msgpack

A minimalistic, extensible MessagePack encoder and decoder for the web, supporting circular references. Built upon tiny-msgpack.

Why not just use tiny-msgpack?

This library adds support for circular references and undefined as a value.

Installation

 $ npm i circ-msgpack

Usage

import { encode, decode } from "circ-msgpack"

const ob = { a: 1, b: "2", c: undefined }
ob.d = ob

const encoded = encode(ob)
const decoded = decode(encoded)

console.log(deepCircularEqual(ob, decoded)) // true

Contribute

All feedback is appreciated. Create a pull request or write an issue.

About

A minimalistic, extensible MessagePack encoder and decoder for the web, supporting circular references. Built upon tiny-msgpack.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published