     console.groupEnd()
 
     navigate = (address=options.get_address(), urls=_urls) ->
-        unless options.notrailingslash
-            address += '/' unless address[address.length-1] == '/'
         console.groupCollapsed "navigate to: #{address}"
 
         handler = null

    navigate()  # explicitly check address on initialization

exports.redirect = (address) ->
    unless options.notrailingslash
        address += '/' unless address[address.length-1] == '/'
    console.log "redirecting to `#{address}'"
    options.redirect address

    add_change_listener: (fn) -> window.addEventListener 'hashchange', -> fn()
    get_address:         -> window.location.hash.substr 1
    redirect:            (address) -> window.location.hash = address

# urls: array of urlpatterns
exports.route = (_urls, _options={}) ->
