1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Merge branch '2.9.0' into production

This commit is contained in:
Denis Demchenko 2020-01-28 22:26:23 +02:00
commit 743050f42e
4 changed files with 3042 additions and 1578 deletions

View File

@ -1,5 +1,8 @@
# Bowser Changelog # 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) ### 2.8.1 (Dec 26, 2019)
- [FIX] Reverted [#382] as it broke build - [FIX] Reverted [#382] as it broke build

18
index.d.ts vendored
View File

@ -22,6 +22,14 @@ declare namespace Bowser {
function parse(UA: string): Parser.ParsedResult; 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 { namespace Parser {
interface Parser { interface Parser {
constructor(UA: string, skipParsing?: boolean): Parser.Parser; constructor(UA: string, skipParsing?: boolean): Parser.Parser;
@ -174,6 +182,16 @@ declare namespace Bowser {
satisfies(checkTree: checkTree): boolean | undefined; 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)` * Check if any of the given values satifies `.is(anything)`
* @param {string[]} anythings * @param {string[]} anythings

4591
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "bowser", "name": "bowser",
"version": "2.8.1", "version": "2.9.0",
"description": "Lightweight browser detector", "description": "Lightweight browser detector",
"keywords": [ "keywords": [
"browser", "browser",
@ -29,12 +29,12 @@
"url": "git+https://github.com/lancedikson/bowser.git" "url": "git+https://github.com/lancedikson/bowser.git"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.6.2", "@babel/cli": "^7.8.3",
"@babel/core": "^7.6.2", "@babel/core": "^7.8.0",
"@babel/polyfill": "^7.6.0", "@babel/polyfill": "^7.8.3",
"@babel/preset-env": "^7.6.2", "@babel/preset-env": "^7.8.2",
"@babel/register": "^7.6.2", "@babel/register": "^7.8.3",
"ava": "^2.4.0", "ava": "^3.0.0",
"babel-eslint": "^10.0.3", "babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6", "babel-loader": "^8.0.6",
"babel-plugin-add-module-exports": "^1.0.2", "babel-plugin-add-module-exports": "^1.0.2",
@ -44,7 +44,7 @@
"docdash": "^1.1.1", "docdash": "^1.1.1",
"eslint": "^6.5.1", "eslint": "^6.5.1",
"eslint-config-airbnb-base": "^13.2.0", "eslint-config-airbnb-base": "^13.2.0",
"eslint-plugin-ava": "^8.0.0", "eslint-plugin-ava": "^10.0.0",
"eslint-plugin-import": "^2.18.2", "eslint-plugin-import": "^2.18.2",
"gh-pages": "^2.1.1", "gh-pages": "^2.1.1",
"jsdoc": "^3.6.3", "jsdoc": "^3.6.3",