2023-04-04 06:05:47 +03:00
|
|
|
import { _array_like_to_array } from "./_array_like_to_array.js";
|
|
|
|
|
|
|
|
export function _unsupported_iterable_to_array(o, minLen) {
|
2023-03-31 09:15:21 +03:00
|
|
|
if (!o) return;
|
|
|
|
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
2023-04-04 06:05:47 +03:00
|
|
|
|
2023-03-31 09:15:21 +03:00
|
|
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
2023-04-04 06:05:47 +03:00
|
|
|
|
2023-03-31 09:15:21 +03:00
|
|
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
|
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
|
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
2021-12-07 09:12:54 +03:00
|
|
|
}
|
2023-04-04 06:05:47 +03:00
|
|
|
export { _unsupported_iterable_to_array as _ };
|