MCPcopy Index your code
hub / github.com/bigcode-project/jupytercoder / _unsupportedIterableToArray

Function _unsupportedIterableToArray

src/diff.js:429–436  ·  view source on GitHub ↗
(o, minLen)

Source from the content-addressed store, hash-verified

427 }
428
429 function _unsupportedIterableToArray(o, minLen) {
430 if (!o) return;
431 if (typeof o === "string") return _arrayLikeToArray(o, minLen);
432 var n = Object.prototype.toString.call(o).slice(8, -1);
433 if (n === "Object" && o.constructor) n = o.constructor.name;
434 if (n === "Map" || n === "Set") return Array.from(o);
435 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
436 }
437
438 function _arrayLikeToArray(arr, len) {
439 if (len == null || len > arr.length) len = arr.length;

Callers 1

_toConsumableArrayFunction · 0.85

Calls 1

_arrayLikeToArrayFunction · 0.85

Tested by

no test coverage detected