sindresorhus/electron-dl

Provide access to receivedBytes and totalBytes

开放

#31 创建于 2017年10月27日

 (9 条评论) (0 个反应) (0 位负责人)JavaScript (136 个派生)user submission
enhancementhelp wanted

仓库指标

星标
 (1,206 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Perhaps in the onProgress handler? It could receive a second parameter with a details object. The signature could look something like this:

{
  receivedBytes,
  totalBytes,
  item,
}

Further expanding on this idea, it could also include useful info like eta (estimated time remaining in milliseconds) and bps (current bytes per second). These would be handy but are less important as they can be calculated outside of the module using receivedBytes, totalBytes and a setTimeout.

贡献者指南