UNPKG

@web3r/flowerkit

Version:

Tree-shakable JavaScript and TypeScript utility library for frontend/browser apps: DOM, events, arrays, objects, strings, date, JSON, and network helpers (ESM/CJS, SSR-friendly).

13 lines (12 loc) 477 B
Object.defineProperty(exports,"__esModule",{value:true}); /** * Checks if an object is promise * @param obj{*} source object * @returns {boolean} * @example * // How to check if an object is promise? * const obj = new Promise(() => {}); * const isPromise = isObjPromise(obj); * console.log(isPromise); // => true */const isObjPromise=obj=>!!obj&&typeof obj==="object"&&typeof obj.then==="function";exports.isObjPromise=isObjPromise; //# sourceMappingURL=index.cjs.map