Skip to content

Commit b39d40a

Browse files
committedJun 25, 2020
Fix lint errors
1 parent 666ba71 commit b39d40a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed
 

‎src/index.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
/* global window self */
22

33
const isBrowser =
4-
typeof window !== "undefined" && typeof window.document !== "undefined";
4+
typeof window !== 'undefined' && typeof window.document !== 'undefined';
55

66
/* eslint-disable no-restricted-globals */
77
const isWebWorker =
8-
typeof self === "object" &&
8+
typeof self === 'object' &&
99
self.constructor &&
10-
self.constructor.name === "DedicatedWorkerGlobalScope";
10+
self.constructor.name === 'DedicatedWorkerGlobalScope';
1111
/* eslint-enable no-restricted-globals */
1212

1313
const isNode =
14-
typeof process !== "undefined" &&
14+
typeof process !== 'undefined' &&
1515
process.versions != null &&
1616
process.versions.node != null;
1717

1818
/**
1919
* @see https://github.com/jsdom/jsdom/releases/tag/12.0.0
2020
* @see https://github.com/jsdom/jsdom/issues/1537
2121
*/
22+
/* eslint-disable no-undef */
2223
const isJsDom = () =>
23-
(typeof window !== "undefined" && window.name === "nodejs") ||
24-
navigator.userAgent.includes("Node.js") ||
25-
navigator.userAgent.includes("jsdom");
24+
(typeof window !== 'undefined' && window.name === 'nodejs') ||
25+
navigator.userAgent.includes('Node.js') ||
26+
navigator.userAgent.includes('jsdom');
2627

2728
export { isBrowser, isWebWorker, isNode, isJsDom };

0 commit comments

Comments
 (0)
Please sign in to comment.