main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 6 months ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
239 bytes
|
Line | |
---|
1 | function cloneArray(array) {
|
---|
2 | var cloned = array.slice(0);
|
---|
3 |
|
---|
4 | for (var i = 0, l = cloned.length; i < l; i++) {
|
---|
5 | if (Array.isArray(cloned[i])) { cloned[i] = cloneArray(cloned[i]); }
|
---|
6 | }
|
---|
7 |
|
---|
8 | return cloned;
|
---|
9 | }
|
---|
10 |
|
---|
11 | module.exports = cloneArray;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.