upair

0.0.4 • Public • Published

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i upair

      Weekly Downloads

      0

      Version

      0.0.4

      License

      MIT

      Unpacked Size

      28.1 kB

      Total Files

      17

      Last publish

      Collaborators

      • hieunc