isFunction

说明

检查是否函数

源码

用法

isFunction.test.ts
1
import { isFunction } from "../../utility/function/isFunction";
2
3
describe('isFunction', () => {
4
test('isFunction should return `true` when received a function object', () => {
5
const origin = [
6
function () { },
7
Symbol,
8
];
9
10
for (const v of origin) {
11
expect(isFunction(v)).toBeTruthy();
12
}
13
});
14
});
Copied!
最近更新 1yr ago
复制链接