@ -572,7 +572,7 @@ const result = parser.getResult();</code></pre>
<brclass="clear">
<brclass="clear">
<footer>
<footer>
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Oct 19 2018 19:31:53 GMT+0200 (Central European Summer Time) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Jan 19 2019 15:43:45 GMT+0200 (EET) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
@ -2422,7 +2422,7 @@ Returns <code>undefined</code> when the browser is no described in the checkTree
<divclass="description">
<divclass="description">
<p>Check if any of the given values satifies this.is(anything)</p>
<p>Check if any of the given values satisfies this.is(anything)</p>
</div>
</div>
@ -2687,7 +2687,7 @@ Returns <code>undefined</code> when the browser is no described in the checkTree
<brclass="clear">
<brclass="clear">
<footer>
<footer>
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Oct 19 2018 19:31:53 GMT+0200 (Central European Summer Time) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Jan 19 2019 15:43:45 GMT+0200 (EET) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Oct 19 2018 19:31:53 GMT+0200 (Central European Summer Time) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Jan 19 2019 15:43:45 GMT+0200 (EET) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
@ -766,7 +766,7 @@ like <code>"iPhone"</code> or <code>"Kindle Fire HD 7"</code
<brclass="clear">
<brclass="clear">
<footer>
<footer>
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Oct 19 2018 19:31:53 GMT+0200 (Central European Summer Time) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Jan 19 2019 15:43:45 GMT+0200 (EET) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
<p><em>Please, note that this is an alpha version. Check out the <ahref="https://github.com/lancedikson/bowser/tree/v1.x">1.x</a> branch for a stable version.</em></p>
<p><em>Please, note that this is an alpha version. Check out the <ahref="https://github.com/lancedikson/bowser/tree/v1.x">1.x</a> branch for a stable version.</em></p>
<p><strong>Changes of version 2.0</strong>
<p><strong>Changes of version 2.0</strong>
The upcoming 2.0 version has drastically changed API. All available methods can be found in the <code>docs</code> folder from now on and on a webpage soon.</p>
The upcoming 2.0 version has drastically changed API. All available methods can be found in the <code>docs</code> folder from now on and on a webpage soon.</p>
<h1>Use cases</h1><p>First of all, require the library:</p>
<h1>Use cases</h1><p>First of all, require the library. This is a UMD Module, so it will work for AMD, Typescript and CommonJS module systems.</p>
<preclass="prettyprint source lang-javascript"><code>const bowser = require('bowser');</code></pre><p>By default, <code>require('bowser')</code> requires the <em>ES5 version of files</em>, which
<strong>do not</strong> include any polyfills.</p>
import * as Bowser from "bowser" // Typescript</code></pre><p>By default, the exported version is the <em>ES5 transpiled version</em>, which <strong>do not</strong> include any polyfills.</p>
<p>In case you don't use your own <code>babel-polyfill</code> you may need to have pre-built bundle with all needed polyfills.
<p>In case you don't use your own <code>babel-polyfill</code> you may need to have pre-built bundle with all needed polyfills.
So, for you it's suitable to require bowser like this: <code>require('bowser/bundled')</code>.
So, for you it's suitable to require bowser like this: <code>require('bowser/bundled')</code>.
As the result, you get a ES5 version of bowser with <code>babel-polyfill</code> bundled together.</p>
As the result, you get a ES5 version of bowser with <code>babel-polyfill</code> bundled together.</p>
Thus, you can define OS or platform specific rules and they will have more priority in the end.</p>
Thus, you can define OS or platform specific rules and they will have more priority in the end.</p>
<p>More of API and possibilities you will find in the <code>docs</code> folder.</p>
<p>More of API and possibilities you will find in the <code>docs</code> folder.</p>
<h1>Contributing</h1><p>If you'd like to contribute a change to bowser, modify the files in <code>src/</code>, then run the following (you'll need node + npm installed):</p>
<h1>Contributing</h1><p>If you'd like to contribute a change to bowser, modify the files in <code>src/</code>, then run the following (you'll need node + npm installed):</p>
$ npm test</code></pre><h3>Adding tests</h3><p>See the list in <code>test/acceptance/useragentstrings.yml</code> with example user agents and their expected bowser object.</p>
$ npm test #run tests
$ npm run lint #check lint rules</code></pre><h3>Adding tests</h3><p>See the list in <code>test/acceptance/useragentstrings.yml</code> with example user agents and their expected bowser object.</p>
<p>Whenever you add support for new browsers or notice a bug / mismatch, please update the list and
<p>Whenever you add support for new browsers or notice a bug / mismatch, please update the list and
check if all tests are still passing.</p>
check if all tests are still passing.</p>
<h3>Similar Projects</h3><ul>
<h3>Similar Projects</h3><ul>
@ -156,7 +159,7 @@ check if all tests are still passing.</p>
<brclass="clear">
<brclass="clear">
<footer>
<footer>
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Oct 19 2018 19:31:53 GMT+0200 (Central European Summer Time) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Jan 19 2019 15:43:45 GMT+0200 (EET) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
* Check if any of the given values satifies this.is(anything)
* Check if any of the given values satisfies this.is(anything)
* @param {String[]} anythings
* @param {String[]} anythings
* @returns {Boolean}
* @returns {Boolean}
*/
*/
@ -507,7 +515,7 @@ export default Parser;
<brclass="clear">
<brclass="clear">
<footer>
<footer>
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Oct 19 2018 19:31:53 GMT+0200 (Central European Summer Time) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Jan 19 2019 15:43:45 GMT+0200 (EET) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
if (v[0] === 4 && v[1] >= 4) return 'KitKat';
if (v[0] === 5) return 'Lollipop';
if (v[0] === 6) return 'Marshmallow';
if (v[0] === 7) return 'Nougat';
if (v[0] === 8) return 'Oreo';
return undefined;
}
/**
/**
* Get version precisions count
* Get version precisions count
*
*
@ -203,7 +247,7 @@ module.exports = Utils;
<brclass="clear">
<brclass="clear">
<footer>
<footer>
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Oct 19 2018 19:31:53 GMT+0200 (Central European Summer Time) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <ahref="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sat Jan 19 2019 15:43:45 GMT+0200 (EET) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.