normalify

Normalize different variable value types - e.g. `"1"` becomes `1`

npm install normalify
5 downloads in the last month

Normalify

Build Status NPM version Flattr this project

Normalize different variable value types - e.g. "1" becomes 1

Install

Backend

  1. Install Node.js
  2. npm install --save normalify

Frontend

  1. See Browserify

Usage

var normalify = require('normalify');
var result = normalify({
    a: 'one',
    b: '1',
    c: '1.1',
    d: 1,
    e: 1.1,
    f: {
        a: 'one',
        b: '1',
        c: '1.1',
        d: 1,
        e: 1.1
    }
});
console.log(JSON.stringify(result,null,4));
/* ouputs:
{
    a: 'one',
    b: 1,
    c: 1.1,
    d: 1,
    e: 1.1,
    f: {
        a: 'one',
        b: 1,
        c: 1.1,
        d: 1,
        e: 1.1
    }
}
*/

History

You can discover the history inside the History.md file

Backers

Check out the Backers.md file to discover all the amazing people who financially supported the development of this project.

License

Licensed under the incredibly permissive MIT License
Copyright © 2013+ Bevry Pty Ltd

npm loves you