|
|
|
|
|
by jpolitz
5026 days ago
|
|
Cool! Sucks that it has to be so stringly typed, but I can't see another alternative. One concern: "Each pattern will be tried in order until a match is found." As far as I know, ECMAScript doesn't specify any enumerations on objects that obey an order... browsers do syntactic order, but it's by no means a guarantee. (e.g. http://stackoverflow.com/a/280861) |
|
edit: BTW, if you want some precedence in a major library relying on this behavior, look no further than Backbone's router, specifically the `_bindRoutes` method.