sindresorhus/electron-dl

Provide access to receivedBytes and totalBytes

Open

#31 opened on Oct 27, 2017

View on GitHub
 (9 comments) (0 reactions) (0 assignees)JavaScript (1,206 stars) (136 forks)user submission
enhancementhelp wanted

Description

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.

Contributor guide

Provide access to receivedBytes and totalBytes · sindresorhus/electron-dl#31 | Good First Issue