Skip to content

cobbdb/encodeuriparams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

encodeuriparams NPM version

Turn an object into an encoded URI parameter string.

$ npm install encodeuriparams

Convert a single object

var encode = require('encodeuriparams');
var params = encode({
    some: 'value'
});

params will now equal some=value&.

Maintain order with an array

params = encode([{
    string: 'value'
}, {
    num: 123
}}]);

params will now equal string=value&num=123&.

Add the question mark automatically

params = encode({
    boolVal: true
}, true);

params will now equal ?boolVal=true&.


About

Turn an object into an encoded URI parameter string.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published