as-bytestream-codecs
v0.0.1
Published
Object serialization/deserialization primitives for JavaScript
Downloads
2
Readme
as-bytestream-codecs
Serialization/deserialization primitives for JavaScript. This is a utility library that provides another layer of abstraction to serialization/deserialization within an application.
installation
Use the following command to install the library from npm:
npm install as-bytestream-codecs
usage
The library provides 2 functions:
serialize(codecName, obj, options)
: Used to serialize an object.deserialize(codecName, buf, options)
: Used to deserialize an object.
codecs supported
json
msgpack
options
options
is an optional object that depends on the codec being used. Each codec has a different set of options, as listed below.
json
:serialize()
:replacer
: SeeJSON.stringify()
space
: SeeJSON.stringify()
deserialize()
:reviver
: SeeJSON.parse()
contact
All feedback/suggestions/criticisms can be directed to Anand Suresh