Skip to content

Commit ff8fe80

Browse files
committed
added isFunction util
1 parent 540ef65 commit ff8fe80

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/utils/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ export function isObject(item) {
2121
return (item && typeof item === 'object' && !Array.isArray(item) && item !== null);
2222
}
2323

24+
/**
25+
* Simple is function check
26+
* @param item
27+
* @returns {*|boolean}
28+
*/
29+
export function isFunction(item) {
30+
return (item && typeof item === 'function');
31+
}
32+
2433
// noinspection Eslint
2534
export const windowOrGlobal = (typeof self === 'object' && self.self === self && self) || (typeof global === 'object' && global.global === global && global) || this;
2635

0 commit comments

Comments
 (0)