# dwebfs-network-speed

> Get dWebFS network speeds (download/upload speeds).

Latest version **1.0.0** (published 2020-06-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install dwebfs-network-speed
pnpm add dwebfs-network-speed
yarn add dwebfs-network-speed
bun add dwebfs-network-speed
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-06-24 |
| First published | 2020-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joe Hand |
| Maintainers | shikhars3711 |

## Links

- npm: https://www.npmjs.com/package/dwebfs-network-speed
- Repository: https://github.com/joehand/dwebfs-network-speed
- Homepage: https://github.com/joehand/dwebfs-network-speed#readme
- Issues: https://github.com/joehand/dwebfs-network-speed/issues
- npm.io page: https://npm.io/package/dwebfs-network-speed

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^3.1.0
- [speedometer](https://npm.io/package/speedometer.md) ^1.0.0

## Recent versions

- 1.0.0 (latest) — 2020-06-24

## README

# dwebfs-network-speed

[![Travis](https://img.shields.io/travis/datproject/dwebfs-network-speed.svg?style=flat-square)](https://travis-ci.org/datproject/dwebfs-network-speed) [![npm](https://img.shields.io/npm/v/dwebfs-network-speed.svg?style=flat-square)](https://npmjs.org/package/dwebfs-network-speed)

Get upload and download speeds for a dwebfs archive.

## Usage

```js
var archive = dwebfs('.dweb')
var swarm = dweb-discovery(archive)
var speed = networkSpeed(archive, {timeout: 1000})

setInterval(function () {
  console.log('upload speed: ', speed.uploadSpeed)
  console.log('download speed: ', speed.downloadSpeed)
}, 500)
```

## API

### `var speed = networkSpeed(archive, [opts])`

* `archive` is a dwebfs archive.
* `opts.timeout` is the only option. Speed will be reset to zero after the timeout.

#### `speed.uploadSpeed`

Archive upload speed across all peers.

#### `speed.downloadSpeed`

Archive download speed across all peers.

#### `speed.downloadTotal`

Archive total download.

#### `speed.uploadTotal`

Archive total upload.

## License

MIT

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