We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bb5ea3 commit e335b0dCopy full SHA for e335b0d
packages/core/src/tools/globalObject.ts
@@ -49,5 +49,6 @@ export function getGlobalObject<T = typeof globalThis>(): T {
49
export const globalObject = getGlobalObject<GlobalObject>()
50
51
export const isWorkerEnvironment = 'WorkerGlobalScope' in globalObject
52
+// @see https://stackoverflow.com/questions/4224606/how-to-check-whether-a-script-is-running-under-node-js
53
// @ts-expect-error module is undefined outside of Node.
54
export const isNodeEnvironment = typeof module !== 'undefined' && module.exports
0 commit comments