(function (global, factory) {
  if (typeof define === "function" && define.amd) {
    define(['exports'], factory);
  } else if (typeof exports !== "undefined") {
    factory(exports);
  } else {
    var mod = {
      exports: {}
    };
    factory(mod.exports);
    global.jouter = mod.exports;
  }
})(this, function (exports) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  var _extends = Object.assign || function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];

      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }

    return target;
  };

  function _toConsumableArray(arr) {
    if (Array.isArray(arr)) {
      for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
        arr2[i] = arr[i];
      }

      return arr2;
    } else {
      return Array.from(arr);
    }
  }

  var TOKEN_RE = /:[^\/]+/g;
  var ANY_RE = /\*/g;
  var SUBPATH_RE = /\/\.\.\./g;

  var regexify = function regexify(x) {
    return x.replace(TOKEN_RE, '([^/]+)').replace(ANY_RE, '.*').replace(SUBPATH_RE, '(\/.*)');
  };

  // parseRoute :: String | RegExp -> RegExp
  var routeRe = function routeRe(x) {
    return x instanceof RegExp ? new RegExp(x.source) : new RegExp('^' + regexify(x) + '$');
  };

  // route ::  (* -> *), String -> (String -> _)
  var route = function route(f, r) {
    var re = routeRe(r);
    return function (path) {
      var match = re.exec(path);
      if (!match) return;
      f.apply(undefined, _toConsumableArray(match.slice(1)));
    };
  };

  // Unsafe functions
  var pathHandler = {
    // get :: _ -> String
    get: function get() {
      return window.location.pathname;
    },

    // set :: (String, String) -> _
    set: function set(path, title) {
      return window.history.pushState(undefined, title, path);
    },

    // listen :: (* -> *) -> _
    listen: function listen(f) {
      return window.onpopstate = f;
    },

    // decorate :: (* -> *) -> (* -> *)
    decorate: function decorate(f) {
      return f;
    }
  };

  var createRouter = exports.createRouter = function createRouter() {
    var myPathHandler = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

    var routes = [];
    var path = _extends({}, pathHandler, myPathHandler);

    var add = function add(f, r) {
      return routes.push(route(path.decorate(f), r));
    };

    var dispatch = function dispatch(p) {
      return routes.forEach(function (f) {
        return f(p);
      });
    };

    var go = function go(p, t) {
      path.set(p, t);
      dispatch(path.get());
    };

    var handleEvent = function handleEvent(e) {
      e.preventDefault();
      go(e.target.href, e.target.title);
    };

    var start = function start() {
      path.listen(function () {
        return dispatch(path.get());
      });
      dispatch(path.get());
    };

    var dispatchRoutes = function dispatchRoutes(subpath) {
      return dispatch(subpath);
    };

    dispatchRoutes.add = add;
    dispatchRoutes.go = go;
    dispatchRoutes.handleEvent = handleEvent;
    dispatchRoutes.start = start;

    return dispatchRoutes;
  };

  exports.default = createRouter;
});

@@ -1647,23 +1647,42 @@
 e(1)));%0A
+      return true;%0A
     %7D;%0A
-
   %7D;%0A%0A  
@@ -2163,24 +2163,134 @@
   return f;%0A
+    %7D,%0A%0A    // onNoMatch :: (String -%3E _) -%3E _%0A    onNoMatch: function onNoMatch(f) %7B%0A      return undefined;%0A
     %7D%0A  %7D;%0A%0A
@@ -2680,30 +2680,38 @@
 %7B%0A      
-return
+var hadMatch =
  routes.
 forEach(
@@ -2706,15 +2706,14 @@
 tes.
-forEach
+reduce
 (fun
@@ -2719,16 +2719,24 @@
 nction (
+result, 
 f) %7B%0A   
@@ -2744,29 +2744,136 @@
     
-return f(p);%0A      %7D)
+var match = f(p);%0A        return result %7C%7C match;%0A      %7D, false);%0A      if (!hadMatch) path.onNoMatch(p);%0A      return hadMatch
 ;%0A  

Update dist