1.0.1 • Published 6 years ago

network-information v1.0.1

Weekly downloads
33
License
MIT
Repository
github
Last release
6 years ago

network-information

Provides information about the user's connection using The Network Information API. This can be used to select high definition content or low definition content.

Usage

npm install network-information --save

import Connection from 'network-information'

const connect = new Connection()
connect.init()
console.log(connect.info)

// { effectiveType: "4g", downlink: 10, saveData: false, rtt: 50 }

methods

  • init: add event listeners
  • destroy: remove event listeners

License

MIT, see LICENSE.md for details.

1.0.1

6 years ago

1.0.0

6 years ago