source: node_modules/es-toolkit/dist/compat/_internal/copyArray.js

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 271 bytes
RevLine 
[a762898]1'use strict';
2
3function copyArray(source, array) {
4 const length = source.length;
5 if (array == null) {
6 array = Array(length);
7 }
8 for (let i = 0; i < length; i++) {
9 array[i] = source[i];
10 }
11 return array;
12}
13
14module.exports = copyArray;
Note: See TracBrowser for help on using the repository browser.