Normalize a bowser object to a more usable form
$ npm install @f/normalize-bowser
var normalizeBowser = require('@f/normalize-bowser')
var bowser = require('bowser')
normalizeBowser(bowser)
bowser.browser // === chrome
bowser.version // === 37
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
MIT