UNPKG

@tsdotnet/collection-base

Version:

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/tsdotnet/collection-base/blob/master/LICENSE) ![npm-publish](https://github.com/tsdotnet/collection-base/workflows/npm-publish/badge.svg) [![npm ve

14 lines (13 loc) 452 B
/*! * @author electricessence / https://github.com/electricessence/ * @license MIT */ import { ArrayLikeWritable } from '@tsdotnet/common-interfaces'; /** * Copies all values to a numerically indexable object. * @param {Iterable} source * @param target * @param {number?} index * @returns target */ export default function copyIterableTo<T, TTarget extends ArrayLikeWritable<T>>(source: Iterable<T>, target: TTarget, index?: number): TTarget;