kieran / barista

A URL router / generator for NodeJS
https://kieran.github.io/barista/
MIT License
111 stars 22 forks source link

Added "remove" command. #5

Closed abraxas closed 11 years ago

abraxas commented 11 years ago

Hi. I've found the Barista library extremely useful thus far, feeling its strongest feature is the ability to add complex routes at runtime, separated from the process that actually interprets those routes.

My needs, however, required the ability to remove routes on the fly as easily as add them. I did so by using your undocumented "name" feature along with creating a router.remove( name ) method. Since I'm finding your library so useful, I figured I'd "share the love" and give back the additions I made.

I did my best to match your coding style, and included complete (I hope) tests to verify and prove it.

Thanks!

kieran commented 11 years ago

Rad! I won't be able to check it out until tomorrow, but it sounds awesome :-) Will merge as soon as I get a chance.

Thanks!