redux-devtools/packages/redux-devtools-inspector/src/utils/isIterable.js
2019-01-10 20:51:14 +02:00

9 lines
192 B
JavaScript

export default function isIterable(obj) {
return (
obj !== null &&
typeof obj === 'object' &&
!Array.isArray(obj) &&
typeof obj[window.Symbol.iterator] === 'function'
);
}