export const safeCall = ( fn ? , ... args ) => { try { if ( fn && typeof fn === 'function' ) { return fn ( ... args ) ; } } catch { } } ; export const safeGet = ( object , ... path ) : any => { return path . reduce ( ( value , getter ) => { try { if ( ! value ) { return value ; } return value [ getter ] ; } catch { } } , object ) ; } ; export const safeGetValues = ( object ) : any => { try { return Object . values ( object ) ; } catch { } } ; export const safeRequire = ( window , requiredPackage ) : any => { try { return window [ 'require' ] && window [ 'require' ] ( requiredPackage ) ; } catch { } } ;