Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix false negatives from isSupported #90

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

underbyte
Copy link

This should fix issues #82 and #83.

The problem is that the data set returns as y #x where x is the number mapping to the foot note.

@underbyte underbyte requested a review from Nyalab January 25, 2020 03:41
return browser.split(" ")
})
.every((browser) => {
return data.stats[browser[0]] &&
Copy link

@neenhouse neenhouse Jan 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Support case insensitive search for "Y":

return data.stats[browser[0]] && 
   data.stats[browser[0]][browser[1]] &&
   String.prototype.toLowerCase.call(data.stats[browser[0]][browser[1]][0]) === "y"

Copy link

@neenhouse neenhouse Jan 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, you should incorporate the fix from https://github.com/Nyalab/caniuse-api/pull/61/files here, so:

return data &&
   data.stats[browser[0]] && 
   data.stats[browser[0]][browser[1]] &&
   String.prototype.toLowerCase.call(data.stats[browser[0]][browser[1]][0]) === "y"

@neenhouse
Copy link

@Nyalab - I think this PR looks good. Could you take a look? We need a patch version for a new project we maintain https://github.com/ExpediaGroup/nimbuild/tree/master/packages/nimbuild-corejs.

@celluj34
Copy link

celluj34 commented Dec 7, 2020

It's been almost a year, can we get this merged??

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

Successfully merging this pull request may close these issues.

3 participants