sindresorhus/electron-dl

Provide access to receivedBytes and totalBytes

Open

#31 建立於 2017年10月27日

在 GitHub 查看
 (9 留言) (0 反應) (0 負責人)JavaScript (1,206 star) (136 fork)user submission
enhancementhelp wanted

描述

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.

貢獻者指南