iterableToArray.js 200 Bytes
Newer Older
Patrick's avatar
Patrick committed
1
2
3
4
5
function _iterableToArray(iter) {
  if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
}

module.exports = _iterableToArray;