/** Returns whether the value is a function. Acts as a type guard. */ export function isFunction ( value ) { return typeof value === "function" ; } deprecated export function safeInvoke < R > ( func ) ; export function safeInvoke < A , R > ( func , arg1 ) ; export function safeInvoke < A , B , R > ( func , arg1 , arg2 ) ; export function safeInvoke < A , B , C , R > ( func , arg1 , arg2 , arg3 ) ; export function safeInvoke < A , B , C , D , R > ( func , arg1 , arg2 , arg3 , arg4 ) ; export function safeInvoke ( func , ... args ) { if ( isFunction ( func ) ) { return func ( ... args ) ; } return undefined ; } deprecated export function safeInvokeOrValue < R > ( funcOrValue ) ; export function safeInvokeOrValue < A , R > ( funcOrValue , arg1 ) ; export function safeInvokeOrValue < A , B , R > ( funcOrValue , arg1 , arg2 ) ; export function safeInvokeOrValue < A , B , C , R > ( funcOrValue , arg1 , arg2 , arg3 ) ; export function safeInvokeOrValue < A , B , C , D , R > ( funcOrValue , arg1 , arg2 , arg3 , arg4 ) ; export function safeInvokeOrValue ( funcOrValue , ... args ) { return isFunction ( funcOrValue ) ? funcOrValue ( ... args ) : funcOrValue ; }