Logo

GitLab

Sign in

platform / common-customization

  • Back to Group
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • common-customization
  • ..
  • .0.0.1@clone-stats
  • index.js
  • init
    17711a48
    冯海洋 authored
    2018-05-15 10:55:14 +0800  
    Browse File »
index.js 228 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13
var Stat = require('fs').Stats

module.exports = cloneStats

function cloneStats(stats) {
  var replacement = new Stat

  Object.keys(stats).forEach(function(key) {
    replacement[key] = stats[key]
  })

  return replacement
}