UNPKG

@kitmi/utils

Version:

A JavaScript utility library for both server and browser

23 lines (22 loc) 533 B
/** * Check whether the object is an ES module, if yes, return the default export. * @param {*} obj * @returns {*} */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function() { return _default; } }); const esmCheck = (obj)=>{ if (obj.__esModule && typeof obj.default !== 'undefined') { return obj.default; } return obj; }; const _default = esmCheck; //# sourceMappingURL=esmCheck.js.map