Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
18 lines
373 B
JavaScript
Executable file
18 lines
373 B
JavaScript
Executable file
'use strict';
|
|
|
|
(function(exports) {
|
|
var rparams = /([^?=&]+)(?:=([^&]*))?/g;
|
|
|
|
function parseParams(input) {
|
|
input = input || window.location.href;
|
|
var parsed = {};
|
|
input.replace(rparams, function($0, $1, $2) {
|
|
parsed[decodeURIComponent($1)] = $2 ? decodeURIComponent($2) : $2;
|
|
});
|
|
return parsed;
|
|
}
|
|
|
|
exports.Utils = {
|
|
parseParams: parseParams
|
|
};
|
|
})(window);
|