hidden export const isInteger = ( val ) : val is number => { if ( Number . isInteger ) return Number . isInteger ( val ) ; return typeof val === 'number' && isFinite ( val ) && Math . floor ( val ) === val ; } ; hidden export const isSafeInteger = ( val ) : val is number => { if ( Number . isSafeInteger ) return Number . isSafeInteger ( val ) ; return isInteger ( val ) && Math . abs ( val ) <= Number . MAX_SAFE_INTEGER ; } ; hidden export const isNumberInRange = ( num , range ) => { return typeof num === 'number' && num >= range [ 0 ] && num <= range [ 1 ] ; } ;