buffer-json-codec
Build a proxy-state from plain objects
Install
$ npm install @geut/buffer-json-codec
Usage
import { BufferJSONCodec } from '@geut/buffer-json-codec'
const codec = new BufferJSONCodec()
const buf = codec.encode({
val: 'str',
num: 0,
buf: Buffer.from('str')
})
codec.decode(buf) // { val: 'str', num: 0, buf: <Buffer 73 74 72> }
Issues
Contributing
License
MIT © A GEUT project