Skip to content

Commit c81399a

Browse files
committed
Merge branch '2.3.0' into production
2 parents d3046bf + 91ac5e2 commit c81399a

14 files changed

+1700
-2897
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Bowser Changelog
22

3+
### 2.3.0 (April 14, 2019)
4+
- [ADD] Add support for Blink-based MS Edge (#311)
5+
- [ADD] Add more types for TS (#289)
6+
- [FIX] Update dev-dependencies
7+
- [FIX] Update docs
8+
39
### 2.2.1 (April 12, 2019)
410
- [ADD] Add an alias for Samsung Internet
511
- [FIX] Fix browser name detection for browsers without an alias (#313)

docs/Bowser.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<nav>
2828

29-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Bowser.html">Bowser</a><ul class='methods'><li data-type='method'><a href="Bowser.html#.getParser">getParser</a></li><li data-type='method'><a href="Bowser.html#.parse">parse</a></li></ul></li><li><a href="Parser.html">Parser</a><ul class='methods'><li data-type='method'><a href="Parser.html#getBrowser">getBrowser</a></li><li data-type='method'><a href="Parser.html#getBrowserName">getBrowserName</a></li><li data-type='method'><a href="Parser.html#getBrowserVersion">getBrowserVersion</a></li><li data-type='method'><a href="Parser.html#getEngine">getEngine</a></li><li data-type='method'><a href="Parser.html#getEngineName">getEngineName</a></li><li data-type='method'><a href="Parser.html#getOS">getOS</a></li><li data-type='method'><a href="Parser.html#getOSName">getOSName</a></li><li data-type='method'><a href="Parser.html#getOSVersion">getOSVersion</a></li><li data-type='method'><a href="Parser.html#getPlatform">getPlatform</a></li><li data-type='method'><a href="Parser.html#getPlatformType">getPlatformType</a></li><li data-type='method'><a href="Parser.html#getResult">getResult</a></li><li data-type='method'><a href="Parser.html#getUA">getUA</a></li><li data-type='method'><a href="Parser.html#is">is</a></li><li data-type='method'><a href="Parser.html#parse">parse</a></li><li data-type='method'><a href="Parser.html#parseBrowser">parseBrowser</a></li><li data-type='method'><a href="Parser.html#parseEngine">parseEngine</a></li><li data-type='method'><a href="Parser.html#parseOS">parseOS</a></li><li data-type='method'><a href="Parser.html#parsePlatform">parsePlatform</a></li><li data-type='method'><a href="Parser.html#satisfies">satisfies</a></li><li data-type='method'><a href="Parser.html#some">some</a></li><li data-type='method'><a href="Parser.html#test">test</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#getAndroidVersionName">getAndroidVersionName</a></li><li><a href="global.html#getBrowserAlias">getBrowserAlias</a></li><li><a href="global.html#getFirstMatch">getFirstMatch</a></li><li><a href="global.html#getSecondMatch">getSecondMatch</a></li><li><a href="global.html#getVersionPrecision">getVersionPrecision</a></li><li><a href="global.html#map">map</a></li><li><a href="global.html#matchAndReturnConst">matchAndReturnConst</a></li></ul>
29+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Bowser.html">Bowser</a><ul class='methods'><li data-type='method'><a href="Bowser.html#.getParser">getParser</a></li><li data-type='method'><a href="Bowser.html#.parse">parse</a></li></ul></li><li><a href="Parser.html">Parser</a><ul class='methods'><li data-type='method'><a href="Parser.html#getBrowser">getBrowser</a></li><li data-type='method'><a href="Parser.html#getBrowserName">getBrowserName</a></li><li data-type='method'><a href="Parser.html#getBrowserVersion">getBrowserVersion</a></li><li data-type='method'><a href="Parser.html#getEngine">getEngine</a></li><li data-type='method'><a href="Parser.html#getEngineName">getEngineName</a></li><li data-type='method'><a href="Parser.html#getOS">getOS</a></li><li data-type='method'><a href="Parser.html#getOSName">getOSName</a></li><li data-type='method'><a href="Parser.html#getOSVersion">getOSVersion</a></li><li data-type='method'><a href="Parser.html#getPlatform">getPlatform</a></li><li data-type='method'><a href="Parser.html#getPlatformType">getPlatformType</a></li><li data-type='method'><a href="Parser.html#getResult">getResult</a></li><li data-type='method'><a href="Parser.html#getUA">getUA</a></li><li data-type='method'><a href="Parser.html#is">is</a></li><li data-type='method'><a href="Parser.html#isBrowser">isBrowser</a></li><li data-type='method'><a href="Parser.html#parse">parse</a></li><li data-type='method'><a href="Parser.html#parseBrowser">parseBrowser</a></li><li data-type='method'><a href="Parser.html#parseEngine">parseEngine</a></li><li data-type='method'><a href="Parser.html#parseOS">parseOS</a></li><li data-type='method'><a href="Parser.html#parsePlatform">parsePlatform</a></li><li data-type='method'><a href="Parser.html#satisfies">satisfies</a></li><li data-type='method'><a href="Parser.html#some">some</a></li><li data-type='method'><a href="Parser.html#test">test</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#getAndroidVersionName">getAndroidVersionName</a></li><li><a href="global.html#getBrowserAlias">getBrowserAlias</a></li><li><a href="global.html#getFirstMatch">getFirstMatch</a></li><li><a href="global.html#getSecondMatch">getSecondMatch</a></li><li><a href="global.html#getVersionPrecision">getVersionPrecision</a></li><li><a href="global.html#map">map</a></li><li><a href="global.html#matchAndReturnConst">matchAndReturnConst</a></li></ul>
3030
</nav>
3131

3232
<div id="main">
@@ -572,7 +572,7 @@ <h5>Returns:</h5>
572572
<br class="clear">
573573

574574
<footer>
575-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Apr 07 2019 11:48:14 GMT+0300 (EEST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
575+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Apr 14 2019 13:45:42 GMT+0300 (EEST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
576576
</footer>
577577

578578
<script>prettyPrint();</script>

docs/Parser.html

Lines changed: 203 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<nav>
2828

29-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Bowser.html">Bowser</a><ul class='methods'><li data-type='method'><a href="Bowser.html#.getParser">getParser</a></li><li data-type='method'><a href="Bowser.html#.parse">parse</a></li></ul></li><li><a href="Parser.html">Parser</a><ul class='methods'><li data-type='method'><a href="Parser.html#getBrowser">getBrowser</a></li><li data-type='method'><a href="Parser.html#getBrowserName">getBrowserName</a></li><li data-type='method'><a href="Parser.html#getBrowserVersion">getBrowserVersion</a></li><li data-type='method'><a href="Parser.html#getEngine">getEngine</a></li><li data-type='method'><a href="Parser.html#getEngineName">getEngineName</a></li><li data-type='method'><a href="Parser.html#getOS">getOS</a></li><li data-type='method'><a href="Parser.html#getOSName">getOSName</a></li><li data-type='method'><a href="Parser.html#getOSVersion">getOSVersion</a></li><li data-type='method'><a href="Parser.html#getPlatform">getPlatform</a></li><li data-type='method'><a href="Parser.html#getPlatformType">getPlatformType</a></li><li data-type='method'><a href="Parser.html#getResult">getResult</a></li><li data-type='method'><a href="Parser.html#getUA">getUA</a></li><li data-type='method'><a href="Parser.html#is">is</a></li><li data-type='method'><a href="Parser.html#parse">parse</a></li><li data-type='method'><a href="Parser.html#parseBrowser">parseBrowser</a></li><li data-type='method'><a href="Parser.html#parseEngine">parseEngine</a></li><li data-type='method'><a href="Parser.html#parseOS">parseOS</a></li><li data-type='method'><a href="Parser.html#parsePlatform">parsePlatform</a></li><li data-type='method'><a href="Parser.html#satisfies">satisfies</a></li><li data-type='method'><a href="Parser.html#some">some</a></li><li data-type='method'><a href="Parser.html#test">test</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#getAndroidVersionName">getAndroidVersionName</a></li><li><a href="global.html#getBrowserAlias">getBrowserAlias</a></li><li><a href="global.html#getFirstMatch">getFirstMatch</a></li><li><a href="global.html#getSecondMatch">getSecondMatch</a></li><li><a href="global.html#getVersionPrecision">getVersionPrecision</a></li><li><a href="global.html#map">map</a></li><li><a href="global.html#matchAndReturnConst">matchAndReturnConst</a></li></ul>
29+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Bowser.html">Bowser</a><ul class='methods'><li data-type='method'><a href="Bowser.html#.getParser">getParser</a></li><li data-type='method'><a href="Bowser.html#.parse">parse</a></li></ul></li><li><a href="Parser.html">Parser</a><ul class='methods'><li data-type='method'><a href="Parser.html#getBrowser">getBrowser</a></li><li data-type='method'><a href="Parser.html#getBrowserName">getBrowserName</a></li><li data-type='method'><a href="Parser.html#getBrowserVersion">getBrowserVersion</a></li><li data-type='method'><a href="Parser.html#getEngine">getEngine</a></li><li data-type='method'><a href="Parser.html#getEngineName">getEngineName</a></li><li data-type='method'><a href="Parser.html#getOS">getOS</a></li><li data-type='method'><a href="Parser.html#getOSName">getOSName</a></li><li data-type='method'><a href="Parser.html#getOSVersion">getOSVersion</a></li><li data-type='method'><a href="Parser.html#getPlatform">getPlatform</a></li><li data-type='method'><a href="Parser.html#getPlatformType">getPlatformType</a></li><li data-type='method'><a href="Parser.html#getResult">getResult</a></li><li data-type='method'><a href="Parser.html#getUA">getUA</a></li><li data-type='method'><a href="Parser.html#is">is</a></li><li data-type='method'><a href="Parser.html#isBrowser">isBrowser</a></li><li data-type='method'><a href="Parser.html#parse">parse</a></li><li data-type='method'><a href="Parser.html#parseBrowser">parseBrowser</a></li><li data-type='method'><a href="Parser.html#parseEngine">parseEngine</a></li><li data-type='method'><a href="Parser.html#parseOS">parseOS</a></li><li data-type='method'><a href="Parser.html#parsePlatform">parsePlatform</a></li><li data-type='method'><a href="Parser.html#satisfies">satisfies</a></li><li data-type='method'><a href="Parser.html#some">some</a></li><li data-type='method'><a href="Parser.html#test">test</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#getAndroidVersionName">getAndroidVersionName</a></li><li><a href="global.html#getBrowserAlias">getBrowserAlias</a></li><li><a href="global.html#getFirstMatch">getFirstMatch</a></li><li><a href="global.html#getSecondMatch">getSecondMatch</a></li><li><a href="global.html#getVersionPrecision">getVersionPrecision</a></li><li><a href="global.html#map">map</a></li><li><a href="global.html#matchAndReturnConst">matchAndReturnConst</a></li></ul>
3030
</nav>
3131

3232
<div id="main">
@@ -1670,7 +1670,7 @@ <h4 class="name" id="is"><span class="type-signature"></span>is<span class="sign
16701670

16711671
<dt class="tag-source">Source:</dt>
16721672
<dd class="tag-source"><ul class="dummy"><li>
1673-
<a href="parser.js.html">parser.js</a>, <a href="parser.js.html#line470">line 470</a>
1673+
<a href="parser.js.html">parser.js</a>, <a href="parser.js.html#line477">line 477</a>
16741674
</li></ul></dd>
16751675

16761676

@@ -1810,6 +1810,202 @@ <h5>Returns:</h5>
18101810

18111811

18121812

1813+
<h4 class="name" id="isBrowser"><span class="type-signature"></span>isBrowser<span class="signature">(browserName, includingAlias<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
1814+
1815+
1816+
1817+
1818+
1819+
1820+
<dl class="details">
1821+
1822+
1823+
<dt class="tag-source">Source:</dt>
1824+
<dd class="tag-source"><ul class="dummy"><li>
1825+
<a href="parser.js.html">parser.js</a>, <a href="parser.js.html#line411">line 411</a>
1826+
</li></ul></dd>
1827+
1828+
1829+
1830+
1831+
1832+
1833+
1834+
1835+
1836+
1837+
1838+
1839+
1840+
1841+
1842+
1843+
1844+
1845+
1846+
1847+
1848+
1849+
1850+
1851+
1852+
1853+
1854+
1855+
1856+
1857+
1858+
</dl>
1859+
1860+
1861+
1862+
1863+
1864+
<div class="description">
1865+
<p>Check if the browser name equals the passed string</p>
1866+
</div>
1867+
1868+
1869+
1870+
1871+
1872+
1873+
1874+
1875+
1876+
1877+
1878+
<h5>Parameters:</h5>
1879+
1880+
1881+
<table class="params">
1882+
<thead>
1883+
<tr>
1884+
1885+
<th>Name</th>
1886+
1887+
1888+
<th>Type</th>
1889+
1890+
1891+
<th>Attributes</th>
1892+
1893+
1894+
1895+
<th>Default</th>
1896+
1897+
1898+
<th class="last">Description</th>
1899+
</tr>
1900+
</thead>
1901+
1902+
<tbody>
1903+
1904+
1905+
<tr>
1906+
1907+
<td class="name"><code>browserName</code></td>
1908+
1909+
1910+
<td class="type">
1911+
1912+
</td>
1913+
1914+
1915+
<td class="attributes">
1916+
1917+
1918+
1919+
1920+
1921+
</td>
1922+
1923+
1924+
1925+
<td class="default">
1926+
1927+
</td>
1928+
1929+
1930+
<td class="description last"><p>The string to compare with the browser name</p></td>
1931+
</tr>
1932+
1933+
1934+
1935+
<tr>
1936+
1937+
<td class="name"><code>includingAlias</code></td>
1938+
1939+
1940+
<td class="type">
1941+
1942+
</td>
1943+
1944+
1945+
<td class="attributes">
1946+
1947+
&lt;optional><br>
1948+
1949+
1950+
1951+
1952+
1953+
</td>
1954+
1955+
1956+
1957+
<td class="default">
1958+
1959+
<code>false</code>
1960+
1961+
</td>
1962+
1963+
1964+
<td class="description last"><p>The flag showing whether alias will be included into comparison</p></td>
1965+
</tr>
1966+
1967+
1968+
</tbody>
1969+
</table>
1970+
1971+
1972+
1973+
1974+
1975+
1976+
1977+
1978+
1979+
1980+
1981+
1982+
1983+
1984+
<h5>Returns:</h5>
1985+
1986+
1987+
1988+
1989+
<dl class="param-type">
1990+
<dt>
1991+
Type
1992+
</dt>
1993+
<dd>
1994+
1995+
<span class="param-type">boolean</span>
1996+
1997+
1998+
</dd>
1999+
</dl>
2000+
2001+
2002+
2003+
2004+
2005+
2006+
2007+
2008+
18132009
<h4 class="name" id="parse"><span class="type-signature"></span>parse<span class="signature">()</span><span class="type-signature"></span></h4>
18142010

18152011

@@ -2371,11 +2567,11 @@ <h4 class="name" id="satisfies"><span class="type-signature"></span>satisfies<sp
23712567
<h5>Example</h5>
23722568

23732569
<pre class="prettyprint"><code>const browser = new Bowser(UA);
2374-
if (browser.check({chrome: '>118.01.1322' }))
2570+
if (browser.satisfies({chrome: '>118.01.1322' }))
23752571
// or with os
2376-
if (browser.check({windows: { chrome: '>118.01.1322' } }))
2572+
if (browser.satisfies({windows: { chrome: '>118.01.1322' } }))
23772573
// or with platforms
2378-
if (browser.check({desktop: { chrome: '>118.01.1322' } }))</code></pre>
2574+
if (browser.satisfies({desktop: { chrome: '>118.01.1322' } }))</code></pre>
23792575

23802576

23812577

@@ -2488,7 +2684,7 @@ <h4 class="name" id="some"><span class="type-signature"></span>some<span class="
24882684

24892685
<dt class="tag-source">Source:</dt>
24902686
<dd class="tag-source"><ul class="dummy"><li>
2491-
<a href="parser.js.html">parser.js</a>, <a href="parser.js.html#line479">line 479</a>
2687+
<a href="parser.js.html">parser.js</a>, <a href="parser.js.html#line486">line 486</a>
24922688
</li></ul></dd>
24932689

24942690

@@ -2793,7 +2989,7 @@ <h5>Returns:</h5>
27932989
<br class="clear">
27942990

27952991
<footer>
2796-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Apr 07 2019 11:48:14 GMT+0300 (EEST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
2992+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Apr 14 2019 13:45:42 GMT+0300 (EEST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
27972993
</footer>
27982994

27992995
<script>prettyPrint();</script>

0 commit comments

Comments
 (0)