Marketplace móvil para negocios locales mexicanos. Estructura inicial: - apps/backend (NestJS API) - apps/frontend (React Web) - apps/mobile (Expo/React Native) - apps/mcp-server (Claude MCP Server) - apps/whatsapp-service (WhatsApp Business API) - database/ (PostgreSQL DDL) - docs/ (Documentación) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
29 lines
1.0 KiB
JavaScript
29 lines
1.0 KiB
JavaScript
/**
|
|
* This function returns the global object across Node and browsers.
|
|
*
|
|
* Note: `globalThis` is the standardized approach however it has been added to
|
|
* Node.js in version 12. We need to include this snippet until Node 12 EOL.
|
|
*/
|
|
export function getGlobal() {
|
|
if (typeof globalThis !== 'undefined') {
|
|
return globalThis;
|
|
}
|
|
if (typeof global !== 'undefined') {
|
|
return global;
|
|
}
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Cannot find name 'window'.
|
|
if (typeof window !== 'undefined') {
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Cannot find name 'window'.
|
|
return window;
|
|
}
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Cannot find name 'self'.
|
|
if (typeof self !== 'undefined') {
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Cannot find name 'self'.
|
|
return self;
|
|
}
|
|
}
|
|
//# sourceMappingURL=get-global.util.js.map
|