MCPcopy Index your code
hub / github.com/microsoft/SandDance / _unsupportedIterableToArray

Function _unsupportedIterableToArray

docs/app/js/sanddance-app.js:53845–53852  ·  view source on GitHub ↗
(o, minLen)

Source from the content-addressed store, hash-verified

53843 };
53844}
53845function _unsupportedIterableToArray(o, minLen) {
53846 if (!o) return;
53847 if (typeof o === "string") return _arrayLikeToArray(o, minLen);
53848 var n = Object.prototype.toString.call(o).slice(8, -1);
53849 if (n === "Object" && o.constructor) n = o.constructor.name;
53850 if (n === "Map" || n === "Set") return Array.from(o);
53851 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
53852}
53853function _arrayLikeToArray(arr, len) {
53854 if (len == null || len > arr.length) len = arr.length;
53855 for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];

Callers 1

Calls 2

_arrayLikeToArrayFunction · 0.70
fromMethod · 0.45

Tested by

no test coverage detected