UNPKG

@entity-factory/core

Version:

Create entities on the fly for mocking and testing

14 lines (13 loc) 511 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isFunction = exports.getName = void 0; var getName = function (entity) { return typeof entity === 'string' ? entity : entity.name; }; exports.getName = getName; var isFunction = function (functionToCheck) { return (functionToCheck && ({}.toString.call(functionToCheck) === '[object Function]' || {}.toString.call(functionToCheck) === '[object AsyncFunction]')); }; exports.isFunction = isFunction;