jed/locale — pull request #13 by stuartf (2013-10-18 17:09:45+00:00)
Title: Language without country doesn't match language with country

According to rfc 2616 section 14.4 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

A language-range matches a language-tag if it exactly equals the tag, or if it exactly equals a prefix of the tag such that the first tag character following the prefix is "-"

Thus I would expect

supported = new locale.Locales(["es_ES"]);
new locale.Locales('es').best(supported).toString();

To give me `es_ES` but it gives me `en_US` because that's `locale.Locale.default`