/**
 * Check if we're on the server or client side
 */ export const isClient = typeof window !== 'undefined' ; /**
 * Check if object is a react ref
 */ export const isRef = ( obj ) : boolean => obj !== null && typeof obj === 'object' && Object . prototype . hasOwnProperty . call ( obj , 'current' ) ; const toString = Object . prototype . toString ; export const isBoolean = ( val ) : val is boolean => typeof val === 'boolean' ; export const isFunction = < T extends Function > ( val ) : val is T => typeof val === 'function' ; export const isNumber = ( val ) : val is number => typeof val === 'number' ; export const isString = ( val ) : val is string => typeof val === 'string' ; export const isObject = ( val ) : val is object => toString . call ( val ) === '[object Object]' ; export const isWindow = ( val ) : val is Window => typeof window !== 'undefined' && toString . call ( val ) === '[object Window]' ; export const noop = ( ) => { } ; export const rand = ( min , max ) => { min = Math . ceil ( min ) ; max = Math . floor ( max ) ; return Math . floor ( Math . random ( ) * ( max - min + 1 ) ) + min ; } ; export const round = ( num ) => Math . round ( num * 1e2 ) / 1e2 ;