Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@filerobot/utils / lib / getSpeed.js
Size: Mime:
export default function getSpeed() {
  var fileProgress = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  if (!fileProgress.bytesFinished) return 0;
  var endTime = new Date().getTime();
  var timeDuration = (endTime - fileProgress.startedAt) / 1000;
  var uploadSpeedInBps = fileProgress.bytesFinished / timeDuration;
  return uploadSpeedInBps;
}