node.js lib to convert query string params to desired properties
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
.jshintrc
Gruntfile.js
LICENSE-MIT
README.md
index.js
package.json

README.md

convert-params

convert query string to desired types

Getting Started

Install the module with: npm install convert-params

var convertParams = require('convert-params');
var Joi = require('joi');

var config = {
  a: Joi.types.Number(),
  b: Joi.types.Boolean(),
  c: Joi.types.String()
};

var converted = convertParams({a: '1', b: 'true', c: 'Hello'}, config);
console.log(converted);

// { a: 1, b: true, c: 'Hello' }

Documentation

(Coming soon)

Examples

(Coming soon)

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

License

Copyright (c) 2013 Ryan Fitzgerald
Licensed under the MIT license.