GitXplorerGitXplorer
p

router

public
9 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
b56885203186f95df922c651f830dbe4e8f64c3d

Add more generous matching options for basic capture groups.

pphilipwalton committed 10 years ago
Unverified
3474167e1e007227434cb048c45ce962d2e7de71

Add a changelog for the initial release.

pphilipwalton committed 10 years ago
Unverified
e3ad26c836d62d621cf90101ad921e739434e798

Update the Makefile for the rename and fix jshint errors.

pphilipwalton committed 10 years ago
Unverified
cbeb5a9ec24828c05792821fefa3876a605256bb

Add some dotfiles.

pphilipwalton committed 10 years ago
Unverified
faf9a4d9240468f38fff4b55e023dc593b507b6f

Update the README and fix a typo.

pphilipwalton committed 10 years ago
Unverified
6a111246341835e388a44180554487df428a2e1a

Add documentation.

pphilipwalton committed 10 years ago

README

The README file for this repository.

Router

A simple router utility to match patterns with URLs.

Installation

npm install git+https://git@github.com/philipwalton/router.git

Usage

var router = require('router');

new Router()
    .case('/', function() {
      // The home page.
    });
    .case('/products/', function() {
      // The products list page.
    })
    .case('products/<id>/', function(id) {
      // An individual product page. The `id` variable is passed through.
    })
    .match(location.pathname);

API Reference