Wondering what’s next for npm?Check out our public roadmap! »

modernizr-useragents

1.0.0 • Public • Published

Modernizr User-Agent Tests

Add simple user-agent checks as Modernizr tests.

⚠️ The checks in this package are meant for light-weight corrections to browser engines' rendering quirks. They are too simple and unreliable for critical feature checks.

Installation

npm install modernizr-useragents

Usage

Add specific tests

import addUserAgentTests from 'modernizr-useragents'
 
addUserAgentTests(['firefox', 'safari'])

Add all available tests

import { addAllUserAgentTests } from 'modernizr-useragents'
 
addAllUserAgentTests()

Tests

The following tests are available:

Name Test
ms Microsoft browsers: IE & pre-chromium Edge
ipad Safari on iPadOS
iphone Safari on iOS
ipod Safari on iPods' iOS
ios Either ipad, iphone or ipod
safari Safari, desktop or phone
firefox Firefox

License

MIT License © Philipp Daun

Install

npm i modernizr-useragents

DownloadsWeekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

15.8 kB

Total Files

12

Last publish

Collaborators

  • avatar