Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
23
assets/webapps/email.gaiamobile.org/js/query_string.js
Normal file
23
assets/webapps/email.gaiamobile.org/js/query_string.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
define([], function () {
|
||||
var queryString = {
|
||||
toObject: function toObject(value) {
|
||||
if (!value) {
|
||||
return null;
|
||||
}
|
||||
var result = {};
|
||||
value.split('&').forEach(function (keyValue) {
|
||||
var pair = keyValue.split('=');
|
||||
result[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
|
||||
});
|
||||
return result;
|
||||
},
|
||||
fromObject: function fromObject(object) {
|
||||
var result = '';
|
||||
Object.keys(object).forEach(function (key) {
|
||||
result += (result ? '&' : '') + encodeURIComponent(key) + '=' + encodeURIComponent(object[key]);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
};
|
||||
return queryString;
|
||||
});
|
||||
Loading…
Reference in a new issue