@ -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 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 Wed Feb 13 2019 19:40:42 GMT-0800 (Pacific Standard Time) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
@ -2687,7 +2793,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 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 Wed Feb 13 2019 19:40:42 GMT-0800 (Pacific Standard 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 Wed Feb 13 2019 19:40:42 GMT-0800 (Pacific Standard Time) 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 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 Wed Feb 13 2019 19:40:42 GMT-0800 (Pacific Standard Time) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
<article><h2>Bowser</h2><p>A browser detector. Because sometimes, there is no other way, and not even good modern browsers always provide good feature detection mechanisms.</p>
<article><h2>Bowser</h2><p>A browser detector. Because sometimes, there is no other way, and not even good modern browsers always provide good feature detection mechanisms.</p>
<li><ahref="#contributing">How can I help?</a></li>
<li><ahref="#contributing">How can I help?</a></li>
</ul>
</ul>
<h1>Overview</h1><p>The library is made to help to detect what browser your user has and gives you a convenient API to filter the users somehow depending on their browsers.</p>
<h1>Overview</h1><p>The library is made to help to detect what browser your user has and gives you a convenient API to filter the users somehow depending on their browsers.</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>
<p><strong>Changes of version 2.0</strong>
<p>The version 2.0 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>
<p><em>For legacy code, check out the <ahref="https://github.com/lancedikson/bowser/tree/v1.x">1.x</a> branch and install it through <code>npm install bowser@1.9.4</code>.</em></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>
<h1>Use cases</h1><p>First of all, require the library. This is a UMD Module, so it will work for AMD, TypeScript, ES6, and CommonJS module systems.</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>
import * as Bowser from "bowser"; // TypeScript
import Bowser from "bowser"; // ES6 (and TypeScript with --esModuleInterop enabled)</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>
<p>You may need to use the source files, so they will be available in the package as well.</p>
<p>You may need to use the source files, so they will be available in the package as well.</p>
<h2>Browser props detection</h2><p>Often we need to pick users' browser properties such as the name, the version, the rendering engine and so on. Here is an example how to do it with Bowser:</p>
<h2>Browser props detection</h2><p>Often we need to pick users' browser properties such as the name, the version, the rendering engine and so on. Here is an example how to do it with Bowser:</p>
}</code></pre><h2>Filtering browsers</h2><p>You could want to filter some particular browsers to provide any special support for them or make any workarounds.
}</code></pre><h2>Filtering browsers</h2><p>You could want to filter some particular browsers to provide any special support for them or make any workarounds.
});</code></pre><p>Settings for any particular OS or platform has more priority and redefines settings of standalone browsers.
});</code></pre><p>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.</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>
$ 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
check if all tests are still passing.</p>
<h3>Similar Projects</h3><ul>
<h3>Similar Projects</h3><ul>
<li><ahref="https://github.com/BigBadBleuCheese/Kong">Kong</a> - A C# port of Bowser.</li>
<li><ahref="https://github.com/BigBadBleuCheese/Kong">Kong</a> - A C# port of Bowser.</li>
</ul>
</ul>
@ -159,7 +155,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 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 Wed Feb 13 2019 19:40:42 GMT-0800 (Pacific Standard Time) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.
* Is anything? Check if the browser is called "anything",
* Is anything? Check if the browser is called "anything",
* the OS called "anything" or the platform called "anything"
* the OS called "anything" or the platform called "anything"
@ -515,7 +532,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 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 Wed Feb 13 2019 19:40:42 GMT-0800 (Pacific Standard 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 Wed Feb 13 2019 19:40:42 GMT-0800 (Pacific Standard Time) using the <ahref="https://github.com/clenemt/docdash">docdash</a> theme.