detect-connection-speed
v1.0.3
Published
Detect connection speed with JavaScript
Downloads
8
Readme
detect-connection-speed
Detect connection speed with JavaScript
Install
Install with npm
$ npm install detect-connection-speed
Or install with yarn
$ yarn add detect-connection-speed
import DetectConnectionSpeed from 'detect-connection-speed';
Or umd builds are also available
<script src="path/to/detectConnectionSpeed.js"></script>
Will expose the global variable to window.DetectConnectionSpeed
.
Usage
// Init
var detect = new DetectConnectionSpeed({
url: '',
loop: true,
time: 1000,
detectCallback: function(result) {
console.log(result);
}
});
// Destroy
detect.destroy();
License
MIT © Harvey Zack