import { array_copy } from "./array_copy.js";
import { array_shrink_to_size } from "./array_shrink_to_size.js";

/**
 * @template T
 * @param {T[]} source
 * @param {T[]} target
 */
export function array_copy_entire(source, target) {

    const source_length = source.length;

    array_copy(source, 0, target, 0, source_length);
    array_shrink_to_size(target, source_length);

}
