Socket
Socket
Sign inDemoInstall

fast-api-speedtest

Package Overview
Dependencies
61
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    fast-api-speedtest

This library allows you to test speed with Netflix's Fast.com site.


Version published
Weekly downloads
8
decreased by-33.33%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

fast.com logo

fast-api-speedtest

Build Status NPM version GitHub license

Measure the speed of your internet connection with Netflix's Fast.com speed test.

Installation

$ npm install --save fast-api-speedtest

Example usage

const { FastAPI, SpeedUnits } = require('fast-api-speedtest');

const FastTest = new FastAPI({
    measureUpload: true,
    downloadUnit: SpeedUnits.MBps,
    timeout: 60000
});

FastTest.runTest().then(result => {
    console.log(`Ping: ${result.ping} ms`);
    console.log(`Download speed: ${result.downloadSpeed} ${result.downloadUnit}`);
    console.log(`Upload speed: ${result.uploadSpeed} ${result.uploadUnit}`);
}).catch(e => {
    console.error(e.message);
});

Available Options

PropertyTypeDefault
measureUploadBooleanfalseTo wait for the upload speed result
uploadUnitSpeedUnits / StringMbpsThe resulting unit of upload speed
downloadUnitSpeedUnits / StringMbpsThe resulting unit of download speed
timeoutNumber40000Limit how long the speed test can run
executablePathString-Path to the Chrome startup file. You can use it if Puppeteer failed to start.

Test result

PropertyType
ping*NumberNetwork ping
downloadSpeedNumberNetwork download speed
uploadSpeed*NumberNetwork upload speed
pingUnit*StringNetwork ping unit
downloadUnitStringNetwork download speed unit
uploadUnit*StringNetwork upload speed unit
serversString[]Location(s) of test server(s)

* only available when the "measureUpload" property is set to true

TODO

I want to make this package multifunctional to allow the use of additional speed testing sites and to allow you to choose the best test exactly for you.

Keywords

FAQs

Last updated on 24 Jun 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc