simple-url-speedtest
v0.1.5
Published
A very simple url testing based on ping response
Downloads
7
Maintainers
Readme
simple-url-speedtest
A very simple url testing based on ping response
Table of Contents
Demo
Link to demo: https://simple-url-speedtest.surge.sh
Installation
npm i simple-url-speedtest --save
Usage
Import SpeedTest function into your Application
import SpeedTest from "simple-url-speedtest";
const urlList = [
"https://www.facebook.com",
"https://www.google.com",
"https://www.apple.com",
"https://www.cnn.com",
"https://www.whatsapp.com",
"https://www.yahoo.com",
"https://www.samsung.com",
"https://www.lg.com",
];
/**
* Data arrays response will be in this format
*
* {
* url: string
* ping: number // In milliseconds
* }
*
*/
// Data can be access using function callback method
SpeedTest(urlList, (data) => {
console.log(data)
});
// or using Promise callback method
SpeedTest(urlList).then(data => {
console.log(data)
});