1.0.1 • Published 6 years ago
network-information v1.0.1
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 listenersdestroy
: remove event listeners
License
MIT, see LICENSE.md for details.