JavaScript
Function

Function

Function utility class that provides various methods for functions.

The Function class is extended from the built-in Function object. You can continue to use whatever we normally use.

Usage

To use this module, you first need to import the Function class:

import { Function } from '@ponsetya/core'

Static Methods

Function.is()

The is() method determines whether the passed value is an Function.

Function.is(value: unknown): boolean

Parameters

value: unknown
The value to be checked.
Returns: boolean
A boolean indicating whether the variable is a function.

Examples

console.log(Function.is(() => null)) // true
console.log(Function.is(Function.is)) // true