read-excel-file
Version:
Read `.xlsx` files in a web browser or in Node.js
12 lines (11 loc) • 708 B
JavaScript
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
export default function isPromise(anything) {
return _typeof(anything) === 'object' && typeof anything.then === 'function';
}
// export default function isPromise<Value>(anything: unknown): anything is Promise<Value> {
// return (
// typeof anything === 'object' &&
// typeof (anything as Promise<unknown>).then === 'function'
// )
// }
//# sourceMappingURL=isPromise.js.map