tamp

0.0.3 • Public • Published

Tamp

Tamp is an encoder for Tamper written in JavaScript. Tamper is a categorical data serialization protocol, for more info on, visit the Project Homepage.

Install

To install the latest pubished version, execute npm install tamp in your terminal.

To install the latest development version, do this in your terminal:

git clone git://github.com/oztu/tamp.git
cd tamp
npm install
npm link

Usage

See a real example here.

var createTamp = require('tamp');

// Initialize tamp
var tamp = createTamp();

// Add a packed attribute
tamp.addAttribute({
    attrName: FOR_EXAMPLE.attrName,
    possibilities: FOR_EXAMPLE.possibilities,
    maxChoices: FOR_EXAMPLE.maxChoices
});

// ... add more attributes perhaps ...

// Encode the data
tamp.pack(FOR_EXAMPLE.data);

// Get packed data
var myPackedData = tamp.toJSON();

More info

Package Sidebar

Install

npm i tamp

Weekly Downloads

9

Version

0.0.3

License

none

Last publish

Collaborators

  • ozanturgut
  • unsetbit