mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
Fix nyc misconfiguration
This commit is contained in:
parent
107069b845
commit
3530ca1c70
8
.babelrc
8
.babelrc
@ -1,3 +1,9 @@
|
|||||||
{
|
{
|
||||||
"presets": ["env"]
|
"presets": ["env"],
|
||||||
|
"env": {
|
||||||
|
"test": {
|
||||||
|
"plugins": [ "istanbul" ],
|
||||||
|
"presets": [["env", { "targets": { "node": "current" } }]]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
1892
package-lock.json
generated
1892
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -29,6 +29,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"ava": "^0.25.0",
|
"ava": "^0.25.0",
|
||||||
"babel-cli": "^6.26.0",
|
"babel-cli": "^6.26.0",
|
||||||
|
"babel-plugin-istanbul": "^4.1.6",
|
||||||
"babel-preset-env": "^1.7.0",
|
"babel-preset-env": "^1.7.0",
|
||||||
"babel-register": "^6.26.0",
|
"babel-register": "^6.26.0",
|
||||||
"coveralls": "^3.0.2",
|
"coveralls": "^3.0.2",
|
||||||
|
@ -25,8 +25,8 @@ class Bowser {
|
|||||||
* bowser.getBrowser()
|
* bowser.getBrowser()
|
||||||
*/
|
*/
|
||||||
constructor(UA, skipParsing=false) {
|
constructor(UA, skipParsing=false) {
|
||||||
if (!UA) {
|
if (typeof UA !== 'string') {
|
||||||
throw new Error('UserAgent is not defined');
|
throw new Error('UserAgent should be a string');
|
||||||
}
|
}
|
||||||
return new Parser(UA, skipParsing);
|
return new Parser(UA, skipParsing);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user