circ-msgpack
v1.0.1
Published
A minimalistic, extensible MessagePack encoder and decoder for the web, supporting circular references. Built upon tiny-msgpack.
Downloads
104
Maintainers
Readme
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.