npm

@f/normalize-bowser

1.0.0 • Public • Published

normalize-bowser

Build status Git tag NPM version Code style

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 by require('bowser') or 'bowser._detect(userAgent)`)

Returns: The same bowser object, now decorated with:

  • browser - The name of the browser as a string (one of chrome/safari/firefox/ie/edge/opera/ios/ie/op/and/android). This is a restricted, normalized subset of the
  • version - The browser version number as a float
  • osversion - The OS version number as a float

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @f/normalize-bowser

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • f