Skip to content

Instantly share code, notes, and snippets.

@BlackMac
Created March 27, 2015 11:50
Show Gist options
  • Save BlackMac/2d5e8706c42e9b03ba13 to your computer and use it in GitHub Desktop.
Save BlackMac/2d5e8706c42e9b03ba13 to your computer and use it in GitHub Desktop.
very basic post parser
parsePost = function(input) {
var result = {};
var parts = input.split("&");
parts.forEach(function(part) {
var divided = part.split("=");
result[divided[0]] = divided[1];
});
return result;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment