node-fetch-progress

1.0.2 • Public • Published

node-fetch-progress

Get updates on download progress using fetch.

Install

Using yarn

yarn add node-fetch-progress

Using npm

npm install node-fetch-progress --save

Usage

const response = await fetch(link)
const progress = new Progress(response, { throttle: 100 })
progress.on('progress', (p) => {
  console.log(
    p.total,
    p.done,
    p.totalh,
    p.doneh,
    p.startedAt,
    p.elapsed,
    p.rate,
    p.rateh,
    p.estimated,
    p.progress,
    p.eta,
    p.etah,
    p.etaDate
  )
})

/node-fetch-progress/

    Package Sidebar

    Install

    npm i node-fetch-progress

    Weekly Downloads

    7,965

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    9.25 kB

    Total Files

    8

    Last publish

    Collaborators

    • prio