mirror of
https://github.com/lancedikson/bowser
synced 2026-03-02 03:40:27 +00:00
Improve documentation language, fix an example
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
## Bowser
|
||||
A Browser detector. Because sometimes, there is no other way, and not even good modern browsers always provide good feature detection mechanisms.
|
||||
A browser detector. Because sometimes, there is no other way, and not even good modern browsers always provide good feature detection mechanisms.
|
||||
|
||||
[](https://travis-ci.org/lancedikson/bowser/) [](https://greenkeeper.io/)
|
||||
|
||||
@@ -15,7 +15,7 @@ The library is made to help to detect what browser your user has and gives you a
|
||||
|
||||
_Please, note that this is an alpha version. Check out the [1.x](https://github.com/lancedikson/bowser/tree/v1.x) branch for a stable version._
|
||||
|
||||
**Changes of the 2.0**
|
||||
**Changes of version 2.0**
|
||||
The upcoming 2.0 version has drastically changed API. All available methods can be found in the `docs` folder from now on and on a webpage soon.
|
||||
|
||||
# Use cases
|
||||
@@ -29,7 +29,7 @@ const bowser = require('bowser');
|
||||
By default, `require('bowser')` requires the *ES5 version of files*, which
|
||||
**do not** include any polyfills.
|
||||
|
||||
In case if you don't use your own `babel-polyfill` you may need to have pre-built bundle with all needed polyfills.
|
||||
In case you don't use your own `babel-polyfill` you may need to have pre-built bundle with all needed polyfills.
|
||||
So, for you it's suitable to require bowser like this: `require('bowser/bundled')`.
|
||||
As the result, you get a ES5 version of bowser with `babel-polyfill` bundled together.
|
||||
|
||||
@@ -37,7 +37,7 @@ You may need to use the source files, so they will be available in the package a
|
||||
|
||||
## Browser props detection
|
||||
|
||||
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 make it with Bowser:
|
||||
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:
|
||||
|
||||
```javascript
|
||||
const browser = bowser.getParser(window.navigator.userAgent);
|
||||
|
||||
Reference in New Issue
Block a user