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

feat: add support for using alias in 'is' method #437

Merged
merged 1 commit into from
Sep 12, 2020

Conversation

willamesoares
Copy link
Contributor

Overview

This adds support for using aliases in the parser.is method.
Requested in #389

Test

// window.navigation.userAgent is:
// "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299"

const Bowser = require("bowser");
console.log(Bowser.getParser(window.navigation.userAgent).is('edge', true));

outputs

true

@coveralls
Copy link

coveralls commented Aug 23, 2020

Pull Request Test Coverage Report for Build 960

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 90.53%

Totals Coverage Status
Change from base Build 948: 0.01%
Covered Lines: 577
Relevant Lines: 589

💛 - Coveralls

@lancedikson lancedikson merged commit 24dab5f into bowser-js:master Sep 12, 2020
@lancedikson
Copy link
Collaborator

Thanks, @willamesoares! A great improvement! 💪

@lancedikson
Copy link
Collaborator

It's been released in 2.11.0 🎉

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