UNPKG

@sudoo/marked

Version:

JavaScript & TypeScript code runner in JavaScript, safe with marked territory, asynchronous

23 lines (22 loc) 560 B
"use strict"; /** * @author WMXPY * @namespace Util * @description Type Check */ Object.defineProperty(exports, "__esModule", { value: true }); exports.typeCheckIsConstructor = void 0; const typeCheckIsConstructor = (target) => { if (typeof target !== "function") { return false; } try { Reflect.construct(String, [], target); // eslint-disable-next-line @typescript-eslint/no-unused-vars } catch (error) { return false; } return true; }; exports.typeCheckIsConstructor = typeCheckIsConstructor;