export default { encodeHash : function ( input ) : string { return encodeURIComponent ( input . trim ( ) . replace ( /\s/g , ',' ) ) ; } , decodeHash : function ( hashValue ) : string { return decodeURIComponent ( hashValue . replace ( /^\#/ , '' ) ) . replace ( /,/g , ' ' ) ; } , getArgs : function ( hashValue ) : string [ ] { var decodedHash = this . decodeHash ( hashValue ) ; var args = [ ] ; splitHashList ( decodedHash ) . forEach ( function ( value ) { args . push ( value ) ; } ) ; return args ; } } ; function splitHashList ( str ) { return str . split ( '||' ) . filter ( s => s . length > 0 ) ; }