src/moostaka.js
/**
     * Add a route to the SPA
     * 
     * @param {string} pattern - a pattern string that if matched to the URI
     *      will cause the specified handler to be invoked 
     * @param {function} handler - a callback function to invoke when the user
     *      navigates to this route.
     */
Add a route to the SPA

@param {string} pattern - a pattern string that if matched to the URI
will cause the specified handler to be invoked
@param {function} handler - a callback function to invoke when the user
navigates to this route.
Add a route to the SPA @param { string } pattern - a pattern string that if matched to the URI will cause the specified handler to be invoked @param { function } handler - a callback function to invoke when the user navigates to this route .
route(pattern, handler) {
        this.routes.push({pattern: pattern, handler: handler});
    }
route ( pattern , handler ) { this . routes . push ( { pattern : pattern , handler : handler } ) ; }
Add a route to the SPA
Add a route to the SPA
// should check if pattern is already routed and if so // throw error or overwrite?