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.
$ npm i circ-msgpack
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
All feedback is appreciated. Create a pull request or write an issue.