dist/hawtio-utilities.js
function stringToHash(hashAsString) {
        var entries = {};
        if (hashAsString) {
            var text = decodeURI(hashAsString);
            var items = text.split('&');
            angular.forEach(items, function (item) {
                var kv = item.split('=');
                var key = kv[0];
                var value = kv[1] || key;
                entries[key] = value;
            });
        }
        return entries;
    }
function stringToHash(hashAsString) {
        var entries = {};
        if (hashAsString) {
            var text = decodeURI(hashAsString);
            var items = text.split('&');
            angular.forEach(items, function (item) {
                var kv = item.split('=');
                var key = kv[0];
                var value = kv[1] || key;
                entries[key] = value;
            });
        }
        return entries;
    }
function stringToHash ( hashAsString ) { var entries = { } ; if ( hashAsString ) { var text = decodeURI ( hashAsString ) ; var items = text . split ( '&' ) ; angular . forEach ( items , function ( item ) { var kv = item . split ( '=' ) ; var key = kv [ 0 ] ; var value = kv [ 1 ] || key ; entries [ key ] = value ; } ) ; } return entries ; }
Parses the given string of x=y&bar=foo into a hash
@method stringToHash
@for Core
@static
@param {String} hashAsString
@return {Object}
Parses the given string of x = y&bar = foo into a hash