# hypercore-session

> Make a session from a Hypercore that can auto cancel all inflight requests / downloads.

Latest version **1.0.0** (published 2020-09-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install hypercore-session
pnpm add hypercore-session
yarn add hypercore-session
bun add hypercore-session
```

## 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-09-02 |
| First published | 2020-09-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mathias Buus |
| Maintainers | mafintosh |

## Links

- npm: https://www.npmjs.com/package/hypercore-session
- Repository: https://github.com/mafintosh/hypercore-session
- Issues: https://github.com/mafintosh/hypercore-session/issues
- npm.io page: https://npm.io/package/hypercore-session

## Recent versions

- 1.0.0 (latest) — 2020-09-02

## README

# hypercore-session

Make a session from a Hypercore that can auto cancel all inflight requests / downloads.

```
npm install hypercore-session
```

## Usage

``` js
const HypercoreSession = require('hypercore-session')

const session = new HypercoreSession(feed)

// get a block
const block = await session.get(42)

// get a bunch of blocks
await session.download({ start: 0, end: 42 })

// cancel all currently inflight
session.cancel()
```

## License

MIT

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