Function.{ isCallable, isConstructor }
Less than 1 minute
Function.{ isCallable, isConstructor }
Modules
Types
interface FunctionConstructor {
isCallable(value: any): boolean;
isConstructor(value: any): boolean;
}
Entry points
core-js/proposals/function-is-callable-is-constructor
core-js(-pure)/full/function/is-callable
core-js(-pure)/full/function/is-constructor
Example
Function.isCallable(null); // => false
Function.isCallable({}); // => false
Function.isCallable(function () {}); // => true
Function.isCallable(() => {}); // => true
Function.isCallable(class {}); // => false
Function.isConstructor(null); // => false
Function.isConstructor({}); // => false
Function.isConstructor(function () {}); // => true
Function.isConstructor(() => {}); // => false
Function.isConstructor(class {}); // => true