{"version":3,"file":"index.mjs","sources":[""],"sourcesContent":["export type TIsIterableArgs = Parameters<typeof isIterable>;\r\n\r\nexport type TIsIterableReturn = ReturnType<typeof isIterable>;\r\n\r\n/**\r\n * Check if an object is iterable\r\n * @param obj{any}\r\n * @returns {boolean}\r\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols\r\n * @example\r\n * // How to check for iterability?\r\n * const myDivs = document.querySelectorAll(\"div\");\n * const isCanBeIterated = isIterable(myDivs);\n * console.log(isCanBeIterated); // => true\n * @example\n * // Guard a value before using it in a for-of loop\n * if (isIterable(value)) {\n *   for (const item of value) console.log(item);\n * }\n */\nexport const isIterable = (obj: any): boolean => {\r\n  return obj !== null && typeof (obj as { [Symbol.iterator]?: unknown; })[Symbol.iterator] === \"function\";\r\n};\r\n"],"names":["isIterable","obj","Symbol","iterator"],"mappings":"AAoBO,MAAMA,WAAcC,KAClBA,MAAQ,aAAgBA,IAAyCC,OAAOC,YAAc"}