Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "sniffr", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Browser, os and device detection", | ||
@@ -13,4 +13,3 @@ "main": "src/sniffr.js", | ||
"lint": "./node_modules/.bin/eslint src/* spec/*", | ||
"test": "./node_modules/.bin/karma start karma.conf.js", | ||
"test:tdd": "./node_modules/.bin/karma start karma.conf.js --tdd", | ||
"test": "jest", | ||
"concat": "./node_modules/.bin/concat -o dist/sniffr.js src/modern.js.polyfill.js src/sniffr.js", | ||
@@ -22,3 +21,3 @@ "uglify": "./node_modules/.bin/uglifyjs --compress --mangle --output dist/sniffr.min.js -- dist/sniffr.js", | ||
"type": "git", | ||
"url": "https://github.com/antivanov/sniffr.git" | ||
"url": "https://github.com/amoilanen/sniffr.git" | ||
}, | ||
@@ -36,20 +35,14 @@ "keywords": [ | ||
], | ||
"author": "Anton Ivanov <anton.al.ivanov@gmail.com> (https://github.com/antivanov)", | ||
"author": "Anton Moilanen <anton.a.moilanen@gmail.com> (https://github.com/amoilanen)", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/antivanov/sniffr/issues" | ||
"url": "https://github.com/amoilanen/sniffr/issues" | ||
}, | ||
"devDependencies": { | ||
"chai": "^4.2.0", | ||
"concat": "^1.0.3", | ||
"eslint": "^5.10.0", | ||
"karma": "^3.1.3", | ||
"karma-chrome-launcher": "^2.2.0", | ||
"karma-mocha": "^1.3.0", | ||
"karma-spec-reporter": "0.0.32", | ||
"mocha": "^5.2.0", | ||
"mocha-html-reporter": "0.0.1", | ||
"jest": "^29.7.0", | ||
"uglify-js": "^3.4.9" | ||
}, | ||
"homepage": "https://github.com/antivanov/sniffr" | ||
"homepage": "https://github.com/amoilanen/sniffr" | ||
} |
@@ -55,5 +55,5 @@ <img src="http://publicdomainvectors.org/photos/bastiyxc_schn_ffelhund.png" alt="sniff-sniff..." width="150px" height="100px"/> | ||
## Installation | ||
To install the library use Bower: | ||
To install the library use either Bower or NPM: | ||
``` javascript | ||
```bash | ||
bower install sniffr | ||
@@ -64,2 +64,8 @@ ``` | ||
NPM: | ||
```bash | ||
npm install sniffr | ||
``` | ||
## How to use | ||
@@ -66,0 +72,0 @@ |
@@ -18,2 +18,3 @@ (function(host) { | ||
[/opera mini.*?version\/([\.\_\d]+)/, 'opera.mini'], | ||
[/opr\/([\.\_\d]+)/, 'opera'], | ||
[/opios\/([a-z\.\_\d]+)/, 'opera'], | ||
@@ -25,5 +26,9 @@ [/blackberry/, 'blackberry'], | ||
[/iceweasel\/([\.\_\d]+)/, 'iceweasel'], | ||
[/edge\/([\.\d]+)/, 'edge'] | ||
[/edge\/([\.\d]+)/, 'edge'], | ||
[/edg\/([\.\d]+)/, 'edge'], | ||
[/yabrowser\/([\.\d]+)/, 'yandex'], | ||
[/seamonkey\/([\.\d]+)/, 'seamonkey'], | ||
], | ||
os: [ | ||
[/cros\s*\S+\s*([\.\_\d]+)/, 'chromeos'], | ||
[/linux ()([a-z\.\_\d]+)/, 'linux'], | ||
@@ -102,3 +107,5 @@ [/mac os x/, 'macos'], | ||
return parseInt(versionPart); | ||
}); | ||
}).filter(versionPart => | ||
!isNaN(versionPart) | ||
); | ||
} | ||
@@ -105,0 +112,0 @@ |
Sorry, the diff of this file is not supported yet
10358
4
115
139