UNPKG

jsdoc-rest-api

Version:

A utility that generates a rest api from your JsDoc annotations.

14 lines (10 loc) 300 B
"use strict"; function isFunc(functionToCheck) { if (!functionToCheck) return false; const getType = {}; const toString = getType.toString.call(functionToCheck); return toString === "[object Function]" || toString === "[object AsyncFunction]" || false; } module.exports = { isType: isFunc };