import { parse as _parseUrl } from 'url' ; import { History } from 'history' ; export const parseUrl = ( url ) => _parseUrl ( url , true ) ; export const parseUrlHash = ( url ) => { const hash = parseUrl ( url ) . hash ; return hash ? parseUrl ( hash . slice ( 1 ) ) : null ; } ; export const getCurrentUrl = ( history ) => history . createHref ( history . location ) ;