-
-
Save builtbylane/f20409c1d21fb9d9f853 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_.mixin({ | |
serialize: function (obj) { | |
var urlParams = _.map(obj, function (val, key) { | |
var value = (_.isObject(val)) ? JSON.stringify(val) : String(val); | |
return String(key) + '=' + value; | |
}); | |
return urlParams.join('&'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment