@inglorious/utils
Version:
A set of general-purpose utility functions designed with functional programming principles in mind.
16 lines (10 loc) • 330 B
JavaScript
import { expect, test } from "vitest"
import { isFunction } from "./function.js"
test("it should correctly identify a function", () => {
const func = () => {}
expect(isFunction(func)).toBe(true)
})
test("it should correctly identify a non-function", () => {
const str = "hello"
expect(isFunction(str)).toBe(false)
})