diff --git a/CHANGELOG.md b/CHANGELOG.md index d090085..2a30be6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Bowser Changelog +### 2.2.0 (April 7, 2019) +- [ADD] Add short aliases for browser names (#295) +- [FIX] Fix Yandex Browser version detection (#308) + ### 2.1.2 (March 6, 2019) - [FIX] Fix buggy `getFirstMatch` reference diff --git a/README.md b/README.md index c130864..7a2b381 100644 --- a/README.md +++ b/README.md @@ -131,8 +131,14 @@ Thus, you can define OS or platform specific rules and they will have more prior More of API and possibilities you will find in the `docs` folder. -### Similar Projects +### Browser names for `.satisfies()` + +By default you are supposed to use the full browser name for `.satisfies`. +But, there's a short way to define a browser using short aliases. The full +list of aliases can be found in [the file](src/constants.js). + +## Similar Projects * [Kong](https://github.com/BigBadBleuCheese/Kong) - A C# port of Bowser. -### License +## License Licensed as MIT. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/docs/Bowser.html b/docs/Bowser.html index 8971ea5..57ecfa7 100644 --- a/docs/Bowser.html +++ b/docs/Bowser.html @@ -26,7 +26,7 @@
@@ -572,7 +572,7 @@ const result = parser.getResult();
diff --git a/docs/Parser.html b/docs/Parser.html index cae36d6..7f0c240 100644 --- a/docs/Parser.html +++ b/docs/Parser.html @@ -26,7 +26,7 @@
@@ -1670,7 +1670,7 @@ like Parser#parseBrowser or Source:
@@ -2488,7 +2488,7 @@ Returns undefined when the browser is no described in the checkTree
Source:
@@ -2793,7 +2793,7 @@ Returns undefined when the browser is no described in the checkTree
- Documentation generated by JSDoc 3.5.5 on Wed Mar 06 2019 14:31:23 GMT+0200 (EET) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Sun Apr 07 2019 11:48:14 GMT+0300 (EEST) using the docdash theme.
diff --git a/docs/bowser.js.html b/docs/bowser.js.html index a3c551b..005f8b9 100644 --- a/docs/bowser.js.html +++ b/docs/bowser.js.html @@ -26,7 +26,7 @@
@@ -105,7 +105,7 @@ export default Bowser;
- Documentation generated by JSDoc 3.5.5 on Wed Mar 06 2019 14:31:23 GMT+0200 (EET) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Sun Apr 07 2019 11:48:14 GMT+0300 (EEST) using the docdash theme.
diff --git a/docs/global.html b/docs/global.html index 6b7e103..73ac0ef 100644 --- a/docs/global.html +++ b/docs/global.html @@ -26,7 +26,7 @@
@@ -133,7 +133,7 @@
Source:
@@ -296,6 +296,162 @@ +

getBrowserAlias(browserName) → {string}

+ + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+

Get short version/alias for a browser name

+
+ + + + + + + + + +
Example
+ +
getBrowserAlias('Microsoft Edge') // edge
+ + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
browserName + + +string + + + +
+ + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + + + +

getFirstMatch(regexp, ua) → {Array|Object|*|boolean|string}

@@ -308,7 +464,7 @@
Source:
@@ -494,7 +650,7 @@
Source:
@@ -675,7 +831,7 @@
Source:
@@ -831,7 +987,7 @@
Source:
@@ -1005,7 +1161,7 @@
Source:
@@ -1839,7 +1995,7 @@ like "iPhone" or "Kindle Fire HD 7"
- Documentation generated by JSDoc 3.5.5 on Wed Mar 06 2019 14:31:23 GMT+0200 (EET) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Sun Apr 07 2019 11:48:14 GMT+0300 (EEST) using the docdash theme.
diff --git a/docs/index.html b/docs/index.html index 6a8be54..71f986f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -26,7 +26,7 @@
@@ -136,10 +136,13 @@ const isValidBrowser = browser.satisfies({ });

Settings for any particular OS or platform has more priority and redefines settings of standalone browsers. Thus, you can define OS or platform specific rules and they will have more priority in the end.

More of API and possibilities you will find in the docs folder.

-

Similar Projects