Skip to content
This repository has been archived by the owner on Feb 14, 2021. It is now read-only.

lookup prefers 'exact match' even with lower quality #6

Open
ankon opened this issue Mar 3, 2020 · 0 comments
Open

lookup prefers 'exact match' even with lower quality #6

ankon opened this issue Mar 3, 2020 · 0 comments

Comments

@ankon
Copy link
Contributor

ankon commented Mar 3, 2020

Based on reading the RFC's description of lookup I would expect this:

expect(lookup('fr-FR, en;q=0.9', ['fr', 'en'])).to.be.equal('fr');

In my tests however it returns 'en', because 'en' is found to be an exact (direct) match.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant