Skip to main content

isFunction

Checks if value is classified as a String primitive or object.

API

function isFunction(value: unknown): value is Function;

Usage

import { isFunction } from '@feedzai/js-utilities';

isFunction(function () {})
// true

isFunction(() => {})
// true

isFunction(class NotAFunction {})
// true

isFunction(/abc/)
// false