wifiman-speedtest
v1.0.1
Published
A TypeScript library for network speed testing using the WiFiman API infrastructure.
Maintainers
Readme
WiFiman Speed Test
A TypeScript library for network speed testing using the WiFiman API infrastructure.
Installation
npm install wifiman-speedtestUsage
Basic Usage
import { WiFiManSpeedTest } from "wifiman-speedtest";
const speedTest = new WiFiManSpeedTest();
const results = await speedTest.runSpeedTest();
console.log(`Download: ${results.downloadSpeed.toFixed(2)} Mbps`);
console.log(`Upload: ${results.uploadSpeed.toFixed(2)} Mbps`);
console.log(`Ping: ${results.server.ping.toFixed(2)} ms`);Command Line
# Run full test
npm test
# Download only
npm test download
# Upload only
npm test uploadConfiguration
const speedTest = new WiFiManSpeedTest({
chunkSize: 5_000_000, // 5MB chunks
measurementDuration: 30000, // 30 seconds
silent: true // No console output
});Test Types
// Full test (download + upload)
await speedTest.runSpeedTest();
// Download only
await speedTest.runDownloadOnly();
// Upload only
await speedTest.runUploadOnly();License
MIT
