UNPKG

@fsi-open/mock-socket

Version:

Javascript mocking library for websockets and socket.io

8 lines (6 loc) 231 B
export default function retrieveGlobalObject() { if (typeof window !== 'undefined') { return window; } return typeof process === 'object' && typeof require === 'function' && typeof global === 'object' ? global : this; }