export function wait ( waitTimeMs ) { return new Promise ( resolve => setTimeout ( resolve , waitTimeMs ) ) ; } export function isIFramed ( ) { try { return window . frameElement ?. nodeName === 'IFRAME' || parent !== top ; } catch ( e ) { return true ; } } export function toLowerCasePropertyNames ( input ) { if ( input === null ) { return null ; } else if ( typeof input !== 'object' ) { return input ; } else if ( Array . isArray ( input ) ) { return input . map ( toLowerCasePropertyNames ) ; } return Object . keys ( input ) . reduce ( ( result , key ) => { const value = input [ key ] ; const newValue = typeof value === 'object' ? toLowerCasePropertyNames ( value ) : value ; result [ key . toLowerCase ( ) ] = newValue ; return result ; } , { } ) ; }