https://github.com/maximilianmairinger/circmsgpack
A minimalistic, extensible MessagePack encoder and decoder for the web, supporting circular references. Built upon tiny-msgpack.
https://github.com/maximilianmairinger/circmsgpack
binary circ circular json messagepack msgpack object recursive serialization
Last synced: 6 months ago
JSON representation
A minimalistic, extensible MessagePack encoder and decoder for the web, supporting circular references. Built upon tiny-msgpack.
- Host: GitHub
- URL: https://github.com/maximilianmairinger/circmsgpack
- Owner: maximilianMairinger
- Created: 2024-01-08T11:41:14.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-19T12:44:02.000Z (7 months ago)
- Last Synced: 2024-10-19T16:46:21.077Z (7 months ago)
- Topics: binary, circ, circular, json, messagepack, msgpack, object, recursive, serialization
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/circ-msgpack
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Circ msgpack
A minimalistic, extensible MessagePack encoder and decoder for the web, supporting circular references. Built upon [tiny-msgpack](https://www.npmjs.com/package/tiny-msgpack).
**Why not just use [tiny-msgpack](https://www.npmjs.com/package/tiny-msgpack)?**
This library adds support for circular references and `undefined` as a value.
## Installation
```shell
$ npm i circ-msgpack
```## Usage
```ts
import { encode, decode } from "circ-msgpack"const ob = { a: 1, b: "2", c: undefined }
ob.d = obconst 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.