8000 Transform error messages · stdlib-js/assert-is-browser@4998a05 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4998a05

committed
Transform error messages
1 parent 35c2057 commit 4998a05

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

lib/main.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,15 @@ var Global = getGlobal();
4545
*/
4646
function isBrowser() {
4747
return (
48-
// Check that we are not running in a Node.js runtime:
49-
IS_NODE === false &&
48+
// Check that we are not running in a Node.js runtime:
49+
(IS_NODE === false &&
5050

5151
// Check for presence of `window` variable:
5252
typeof window === 'object' &&
5353

5454
// Check that the `window` variable matches the determined global variable:
55-
window === Global &&
56-
57-
// Check that the `window` variable is equal to the global scope:
58-
globalScope === true
55+
window === Global && // Check that the `window` variable is equal to the global scope:
56+
globalScope === true)
5957
);
6058
}
6159

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
},
3838
"dependencies": {
3939
"@stdlib/assert-is-node": "^0.2.2",
40-
"@stdlib/utils-global": "^0.2.2"
40+
"@stdlib/utils-global": "^0.2.2",
41+
"@stdlib/error-tools-fmtprodmsg": "^0.2.2"
4142
},
4243
"devDependencies": {
4344
"proxyquire": "^2.0.0",
@@ -79,4 +80,4 @@
7980
"type": "opencollective",
8081
"url": "https://opencollective.com/stdlib"
8182
}
82-
}
83+
}

0 commit comments

Comments
 (0)
0