Socket
Socket
Sign inDemoInstall

fast-api-remake

Package Overview
Dependencies
6
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-api-remake

A speed test powered by fast.com


Version published
Maintainers
1
Weekly downloads
5
increased by400%
Bundle size
8.1 kB
Minified + gzipped

Weekly downloads

Readme

Source

fast.com logo

fast.com API / CLI tool

Build Status NPM version Node version GitHub license

A speed test powered by fast.com
From scratch, with no dependencies

Installation

$ npm install --save fast-speedtest-api

Command-Line Tool

$ npm install --global fast-speedtest-api
$ fast-speedtest --help
    fast-speedtest - speed test powered by fast.com
    usage: fast-speedtest token [-v, --verbose] [-r, --raw] [-n, --no-https] [-t, --timeout timeout] [-c, --count url-count] [-b, --buffer buffer-size] [-u, --unit output-unit]

Api usage

Example:

const FastSpeedtest = require("fast-speedtest-api");

let speedtest = new FastSpeedtest({
    token: "your-app-token", // required
    verbose: false, // default: false
    timeout: 10000, // default: 5000
    https: true, // default: true
    urlCount: 5, // default: 5
    bufferSize: 8, // default: 8
    unit: FastSpeedtest.UNITS.Mbps, // default: Bps
    proxy: 'http://optional:auth@my-proxy:123' // default: undefined
});

speedtest.getSpeed().then(s => {
    console.log(`Speed: ${s} Mbps`);
}).catch(e => {
    console.error(e.message);
});

FAQ

How to get app token ?

Go on fast.com, open your browser devtools, go on Network tab and copy the token on the request url that looks like https://api.fast.com/netflix/speedtest?https=true&token=<the-token>&urlCount=5

TODO

  • Better verbose mode
  • Add tests

Feel free to contribute

Keywords

FAQs

Last updated on 24 Apr 2022

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