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)
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)