0.0.4 • Published 5 years ago

upair v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

vsjs-upair

upair convert Javascript Object into binary format, developed for communicate with vasern-server.

Since data is stored as binary in data file, by using binary format data, we can avoid format data in the server (which reduce server work load).

Note: server will also needs a upair parser to convert binary to object-like type

Example

import UPAIR from 'vsjs-upair';

var jsObject = {
    id: "0b5bab884453136ec8b",
    name: "Peter",
    yearOfBirth: 1984
};

// Convert to binary format (ArrayBuffer)
var arrayBuffer = UPAIR.toBuffer(jsObject);

// Convert back to JavaScript Object
var parsedJsObject = UPAIR.parse(arrayBuffer);

Installation

upair is available as a NPM package name vsjs-upair

$ npm install vsjs-upair

# or using yarn
$ yarn add vsjs-upair

Feedback and contribution are welcome

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago