MCPcopy
hub / github.com/vuejs/core / getGlobalThis

Function getGlobalThis

packages/shared/src/general.ts:188–202  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186
187let _globalThis: any
188export const getGlobalThis = (): any => {
189 return (
190 _globalThis ||
191 (_globalThis =
192 typeof globalThis !== 'undefined'
193 ? globalThis
194 : typeof self !== 'undefined'
195 ? self
196 : typeof window !== 'undefined'
197 ? window
198 : typeof global !== 'undefined'
199 ? global
200 : {})
201 )
202}
203
204const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/
205

Callers 5

baseCreateRendererFunction · 0.90
hmr.tsFile · 0.90
component.tsFile · 0.90
initFeatureFlagsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected