UNPKG

mobx

Version:

Simple, scalable state management.

18 lines (15 loc) 331 B
declare const window: any declare const self: any const mockGlobal = {} export function getGlobal() { if (typeof window !== "undefined") { return window } if (typeof global !== "undefined") { return global } if (typeof self !== "undefined") { return self } return mockGlobal }