Skip to content

isFunction

Determine if a value is a Function

67 bytes

Usage

Pass in a value and get a boolean telling you if the value is a function.

import * as
import _
_
from 'radashi'
import _
_
.
function isFunction(value: any): value is Function
export isFunction

Return true if the given value is a function.

@seehttps://radashi.js.org/reference/typed/isFunction

@example

isFunction(0) // => false
isFunction(() => {}) // => true
isFunction(function() {}) // => true
isFunction(async function() {}) // => true
isFunction(class {}) // => false

@version12.1.0

isFunction
('hello') // => false
import _
_
.
function isFunction(value: any): value is Function
export isFunction

Return true if the given value is a function.

@seehttps://radashi.js.org/reference/typed/isFunction

@example

isFunction(0) // => false
isFunction(() => {}) // => true
isFunction(function() {}) // => true
isFunction(async function() {}) // => true
isFunction(class {}) // => false

@version12.1.0

isFunction
(['hello']) // => false
import _
_
.
function isFunction(value: any): value is Function
export isFunction

Return true if the given value is a function.

@seehttps://radashi.js.org/reference/typed/isFunction

@example

isFunction(0) // => false
isFunction(() => {}) // => true
isFunction(function() {}) // => true
isFunction(async function() {}) // => true
isFunction(class {}) // => false

@version12.1.0

isFunction
(() => 'hello') // => true