# fast-api-speedtest

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

Latest version **0.0.6** (published 2021-06-24) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install fast-api-speedtest
pnpm add fast-api-speedtest
yarn add fast-api-speedtest
bun add fast-api-speedtest
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2021-06-24 |
| First published | 2021-06-21 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 50 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Karel Krýda |
| Maintainers | karelkryda |
| Keywords | speed, test, fast, fast api, speed test, network, fast.com, api |

## Links

- npm: https://www.npmjs.com/package/fast-api-speedtest
- Repository: https://github.com/karelkryda/fast-api-speedtest
- Homepage: https://github.com/karelkryda/fast-api-speedtest#readme
- Issues: https://github.com/karelkryda/fast-api-speedtest/issues
- npm.io page: https://npm.io/package/fast-api-speedtest

## Dependencies (3)

- [chromium](https://npm.io/package/chromium.md) ^3.0.2
- [puppeteer](https://npm.io/package/puppeteer.md) ^10.0.0
- [convert-units](https://npm.io/package/convert-units.md) ^3.0.0-beta.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2021-06-24
- 0.0.5 — 2021-06-22
- 0.0.4 — 2021-06-22
- 0.0.3 — 2021-06-22
- 0.0.2 — 2021-06-22
- 0.0.1 — 2021-06-21

## README

<a href="https://fast.com"><img src="https://fast.com/assets/new-logo-vert-37861c.svg" alt="fast.com logo" height="120px" /></a>

# fast-api-speedtest
[![Build Status](https://travis-ci.com/karelkryda/fast-api-speedtest.svg?branch=master)](https://travis-ci.com/github/karelkryda/fast-api-speedtest)
[![NPM version](https://img.shields.io/npm/v/fast-api-speedtest.svg?colorB=0a7bbb)](https://www.npmjs.com/package/fast-api-speedtest)
[![GitHub license](https://img.shields.io/github/license/karelkryda/fast-api-speedtest.svg?colorB=0a7bbb)](https://github.com/karelkryda/fast-api-speedtest/blob/master/LICENSE)

Measure the speed of your internet connection with Netflix's Fast.com speed test.

## Installation
```bash
$ npm install --save fast-api-speedtest
```

## Example usage
```js
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
|Property        | Type                 | Default    |                                                                              |
| :--------------| :------              | :--------- | :--------------------------------------------------------------------------- |
|measureUpload   | Boolean              | false      |To wait for the upload speed result                                           |
|uploadUnit      | SpeedUnits / String  | Mbps       |The resulting unit of upload speed                                            |
|downloadUnit    | SpeedUnits / String  | Mbps       |The resulting unit of download speed                                          |
|timeout         | Number               | 40000      |Limit how long the speed test can run                                         |
|executablePath  | String               | -          |Path to the Chrome startup file. You can use it if Puppeteer failed to start. |

## Test result
|Property         | Type     |                              |
| :---------------| :------  | :--------------------------- |
|ping*            | Number   |Network ping                  |
|downloadSpeed    | Number   |Network download speed        |
|uploadSpeed*     | Number   |Network upload speed          |
|pingUnit*        | String   |Network ping unit             |
|downloadUnit     | String   |Network download speed unit   |
|uploadUnit*      | String   |Network upload speed unit     |
|servers          | String[] |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.

---
_Source: https://npm.io/package/fast-api-speedtest · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
