Skip to content

Commit e335b0d

Browse files
committed
👷 add source comment
1 parent 5bb5ea3 commit e335b0d

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
@@ -49,5 +49,6 @@ export function getGlobalObject<T = typeof globalThis>(): T {
4949
export const globalObject = getGlobalObject<GlobalObject>()
5050

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

0 commit comments

Comments
 (0)