• This project
    • Loading...
  • Sign in

MotherProject / Learning Images

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • OSS-Project
  • node_modules
  • clean-css
  • lib
  • utils
  • clone-array.js
  • 최예리's avatar
    module download · 62452b41
    62452b41
    최예리 authored 2019-11-17 03:34:30 +0900
clone-array.js 241 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12
function cloneArray(array) {
  var cloned = array.slice(0);

  for (var i = 0, l = cloned.length; i < l; i++) {
    if (Array.isArray(cloned[i]))
      cloned[i] = cloneArray(cloned[i]);
  }

  return cloned;
}

module.exports = cloneArray;