0.1.5 • Published 3 years ago

simple-url-speedtest v0.1.5

Weekly downloads
10
License
MIT
Repository
github
Last release
3 years ago

simple-url-speedtest

A very simple url testing based on ping response

Table of Contents

Demo

npm.io

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)
});
0.1.2

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.5

3 years ago

0.1.1

3 years ago