Skip to content

Commit

Permalink
Merge branch '2.9.0' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
lancedikson committed Jan 28, 2020
2 parents f32c4fd + 6add52d commit 743050f
Show file tree
Hide file tree
Showing 4 changed files with 3,131 additions and 1,667 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Bowser Changelog

### 2.9.0 (Jan 28, 2020)
- [ADD] Export more methods and constants via .d.ts [#388], [#390]

### 2.8.1 (Dec 26, 2019)
- [FIX] Reverted [#382] as it broke build

Expand Down
18 changes: 18 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ declare namespace Bowser {

function parse(UA: string): Parser.ParsedResult;

/**
* Constants exposed via bowser getters
*/
const BROWSER_MAP: Record<string, string>;
const ENGINE_MAP: Record<string, string>;
const OS_MAP: Record<string, string>;
const PLATFORMS_MAP: Record<string, string>;

namespace Parser {
interface Parser {
constructor(UA: string, skipParsing?: boolean): Parser.Parser;
Expand Down Expand Up @@ -174,6 +182,16 @@ declare namespace Bowser {

satisfies(checkTree: checkTree): boolean | undefined;

/**
* Check if the browser name equals the passed string
* @param browserName The string to compare with the browser name
* @param [includingAlias=false] The flag showing whether alias will be included into comparison
* @returns {boolean}
*/


isBrowser(browserName: string, includingAlias?: boolean): boolean;

/**
* Check if any of the given values satifies `.is(anything)`
* @param {string[]} anythings
Expand Down
Loading

0 comments on commit 743050f

Please sign in to comment.