belizer
v1.3.1
Published
Belizer is a useful, simple and lightweight toolset to serialize and unserialize
Downloads
5
Readme
Installation
For now the only way to install it is through npm
$ yarn add belizer
or
$ npm i belizer
Usage example
Belizer toolset is exported in two Javascript versions ES Modules (belizer.es.js)
and Common JS (belizer.cjs.js)
Use the syntax that suits your version of javascript.
ES Modules
import {Serialize} from "belizer"
Common JS
const {Serialize} = require("belizer")
const serializeResult = Serialize({
key1: "Test 1",
key2: "Test 2",
lastKey: "Last but not least key"
});
const unserializeResult = Unserialize('key1=Test%201&key2=Test%202&lastKey="Last%20but%20not%20least%20key');
console.log(serializeResult)
// key1=Test%201&key2=Test%202&lastKey="Last%20but%20not%20least%20key"
console.log(unserializeResult)
// {key1: "Test 1", key2: "Test 2", lastKey: "Last but not least key"}
NOTE TO CONTRIBUTORS: Feel free to propose improvements or new features!