array-pairs
v1.0.0
Published
Array pairs transfrom to object.
Downloads
3
Readme
Array pairs
Install
npm install array-pairs --save
Usage
const obj = {
name: "kenticny",
gender: "male",
age: 26
};
encode transform to:
[["name", "kenticny"], ["gender", "male"], ["age", 26]]
API
.encode(obj)
: encode object to array pairs.var arrayPairs = require("array-pairs"); var obj = { ... }; arrayPairs.encode(obj);
.decode(array)
: decode array pairs to object.var arrayPairs = require("array-pairs"); var arr = [ ... ] arrayPairs.decode(arr);