UNPKG

read-excel-file

Version:

Read `.xlsx` files in a web browser or in Node.js

18 lines (16 loc) 805 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = isPromise; 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); } 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