source:
frontend/node_modules/clean-css/lib/utils/clone-array.js
| Last change on this file was 9af201e, checked in by , 12 days ago | |
|---|---|
|
|
| File size: 239 bytes | |
| Rev | Line | |
|---|---|---|
| [9af201e] | 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.
