Comparing version 2.0.0-alpha.3 to 2.0.0-alpha.4
# Bowser Changelog | ||
### 2.0.0-alpha.4 (August 2, 2018) | ||
- [DOCS] Fix usage docs (#238) | ||
- [CHANGE] Make `./es5.js` the main file of the package (#239) | ||
### 2.0.0-alpha.3 (July 22, 2018) | ||
@@ -4,0 +8,0 @@ - [CHANGE] Rename split and rename `compiled.js` to `es5.js` and `bundled.js` (#231, #236, #237) |
{ | ||
"name": "bowser", | ||
"version": "2.0.0-alpha.3", | ||
"version": "2.0.0-alpha.4", | ||
"description": "Lightweight browser detector", | ||
@@ -23,3 +23,3 @@ "keywords": [ | ||
], | ||
"main": "src/bowser.js", | ||
"main": "es5.js", | ||
"repository": { | ||
@@ -26,0 +26,0 @@ "type": "git", |
@@ -29,3 +29,3 @@ ## Bowser | ||
By default, `require('bowser')` requires the *ES6 version of files*, which | ||
By default, `require('bowser')` requires the *ES5 version of files*, which | ||
**do not** include any polyfills. | ||
@@ -37,4 +37,3 @@ | ||
If you use bowser for Node.js, you'd better use `require('bowser/es5')`, | ||
since source files have `import` statements, which are not compatible with Node.js yet. | ||
You may need to use the source files, so they will be available in the package as well. | ||
@@ -97,3 +96,3 @@ ## Browser props detection | ||
```javascript | ||
const browser = bowser.getParsers(window.navigator.userAgent); | ||
const browser = bowser.getParser(window.navigator.userAgent); | ||
const isValidBrowser = browser.satisfies({ | ||
@@ -100,0 +99,0 @@ // declare browsers per OS |
@@ -29,3 +29,3 @@ /*! | ||
*/ | ||
static getParser(UA, skipParsing=false) { | ||
static getParser(UA, skipParsing = false) { | ||
if (typeof UA !== 'string') { | ||
@@ -32,0 +32,0 @@ throw new Error('UserAgent should be a string'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
305571
141