All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
This change log follows the format documented in Keep a CHANGELOG.
- Add
isLinux
function towhichOs
to support Linux OS detection
- Replace
const
withvar
to keep compatibility with old browsers.
-
BREAKING: new API:
-
Functions on the top level were replaced with boolean values representing the state of the current browser:
sniffFns.isIE //=> false sniffFns.isChrome //=> true
-
Simplified API: no more
.browser
, no moresniff-fns/src
inrequire
:- sniffFns.browser.isIE(navigator.userAgent) + sniffFns.isIE - var isChrome = require('sniff-fns/src/is_browser_chrome') - var isChrome = require('sniff-fns/is_chrome') - isChrome(navigator.userAgent) + isChrome
-
To access functions that accepts a user agent string, use
lib
namespace:- sniffFns.browser.isIE(request.ua) + sniffFns.lib.isIE(request.ua) - var isIE = require('sniff-fns/src/is_ie_browser') + var isIE = require('sniff-fns/lib/is_ie') isIE(request.ua)
-
isBb10
renamed toisBlackberry
-
whichOs
is nowwhichOS
-
-
Internal: new tests suite.
-
Internal: code refactoring.
-
iPad now is not detected as a Mac (
isMac
). -
Updated BlackBerry user agent string patterns.
0.4.0 - 2016-05-06
-
Add
isIE
function -
Add
whichBrowserVersion
function which supports Chrome, Mobile Chrome, Firefox, IE and Opera.
Initial release.