Skip to content

v2.0.0

Choose a tag to compare

@fent fent released this 11 Apr 18:13
· 7 commits to master since this release

Bug Fixes

  • fix Infinity speed that would happen when data was read on same ms (2a6edfd)

Code Refactoring

Features

  • toHuman(0) now returns "0B" (ad9350c)
  • add precision option to toHuman() (27917b7)
  • add StreamSpeed#getSpeed() to get current speed (868f2e9)
  • add StreamSpeed#getStreamSpeed() (04603bb)
  • default to calculating speed over a range of time (595d0ce)

Performance Improvements

  • improve performance when adding/removing streams (66952bd)

BREAKING CHANGES

    • new StreamSpeed(timeUnit) - new StreamSpeed({ timeUnit })
  • Speed is now calculated based on total data read over a range of
    time, defaults to 1sec. Previously there were 2 speeds, current speed
    and average speed. Current speed was calculated based on amount of
    data received in latest read over the time difference between latest
    read and last read.
  • speed event now only emits one speed.
  • toHumman(timeUnit) -> toHuman({ timeUnit })
  • const, let not supported in node < 6