Skip to content

ryanfitz/convert-params

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

node.js lib to convert query string params to desired properties

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published