@f/normalize-bowser
v1.0.0
Published
Normalize a bowser object to a more usable form
Downloads
6
Readme
normalize-bowser
Normalize a bowser object to a more usable form
Installation
$ npm install @f/normalize-bowser
Usage
var normalizeBowser = require('@f/normalize-bowser')
var bowser = require('bowser')
normalizeBowser(bowser)
bowser.browser // === chrome
bowser.version // === 37
API
normalizeBowser(bowser)
bowser
- Bowser object (as returned byrequire('bowser')
or 'bowser._detect(userAgent)`)
Returns: The same bowser object, now decorated with:
browser
- The name of the browser as a string (one ofchrome/safari/firefox/ie/edge/opera/ios/ie/op/and/android
). This is a restricted, normalized subset of theversion
- The browser version number as a floatosversion
- The OS version number as a float
License
MIT