Skip to content

Commit 1be6315

Browse files
committed
👷 add source comment
1 parent 00244fd commit 1be6315

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/core/src/tools/globalObject.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,6 @@ export const globalObject = getGlobalObject<GlobalObject>()
5050

5151
export const isBrowserEnvironment = 'document' in globalObject
5252
export const isWorkerEnvironment = 'WorkerGlobalScope' in globalObject
53+
// @see https://stackoverflow.com/questions/4224606/how-to-check-whether-a-script-is-running-under-node-js
5354
// @ts-expect-error module is undefined outside of Node.
5455
export const isNodeEnvironment = typeof module !== 'undefined' && module.exports

0 commit comments

Comments
 (0)