Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fscherwi committed Nov 7, 2018
1 parent 5e1da2e commit 6ed0c82
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function getsysInfo(sysInfo) {
if (sysInfo) {
return sysInfo;
}
return require('./sys-info')();
return require('./sys-info');
}

function chrome(version, sysInfo) {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "get-user-agent",
"version": "3.2.1",
"description": "easily get a useragent",
"version": "3.2.2",
"description": "easily generate a useragent",
"main": "main.js",
"scripts": {
"test": "jest --coverage --collectCoverageFrom=*.js --collectCoverageFrom=!sys-info.js",
Expand All @@ -27,7 +27,7 @@
},
"homepage": "https://github.com/fscherwi/get-user-agent#readme",
"dependencies": {
"get-osx-version": "^1.6.0"
"get-osx-version": "^2.0.0"
},
"devDependencies": {
"coveralls": "^3.0.2",
Expand Down
8 changes: 5 additions & 3 deletions sys-info.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = function () {
function get() {
const os = require('os');
switch (os.platform()) {
case 'darwin':
return 'Macintosh; Intel Mac OS X ' + require('get-osx-version').get();
return 'Macintosh; Intel Mac OS X ' + require('get-osx-version');
case 'windows':
switch (os.arch()) {
case 'x64':
Expand All @@ -28,4 +28,6 @@ module.exports = function () {
default:
return '';
}
};
}

module.exports = get();

0 comments on commit 6ed0c82

Please sign in to comment.