import { noop } from './noop' ; /**
 * Checks if operating in a browser-based environment
 */ export function isBrowser ( ) { return typeof window !== 'undefined' ; } type GetWindowReturnType = ( Window & typeof globalThis ) | { [ k ] : any ; } ; /**
 * Checks if window is available to support SSG/SSR builds
 */ export function getWindow ( ) { if ( isBrowser ( ) ) { return window ; } return { matchMedia : noop , addEventListener : noop , removeEventListener : noop , setTimeout : noop , clearTimeout : noop , } ; } see https export function isInIframe ( ) { return window . self !== window . top ; }