UNPKG

iter-tools-es

Version:
21 lines (15 loc) 324 B
const { ensureIterable } = require('../../internal/iterable.js'); function __toArray(source) { const out = []; for (const value of source) { out.push(value); } return out; } exports.__toArray = __toArray; function toArray(source) { return __toArray(ensureIterable(source)); } exports.toArray = toArray;