export function getGlobal ( ) { if ( typeof window !== "undefined" ) { return window ; } else if ( typeof global !== "undefined" ) { return global ; } else if ( typeof self !== "undefined" ) { return self ; } throw new Error ( "Unable to detect any global variable/context" ) ; }