@ddatabase/session

1.0.0 • Public • Published

@ddatabase/session

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

npm install @ddatabase/session

Usage

const DDatabase Session = require('@ddatabase/session')

const session = new DDatabase Session(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

/@ddatabase/session/

    Package Sidebar

    Install

    npm i @ddatabase/session

    Homepage

    dwebx.org

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.58 kB

    Total Files

    4

    Last publish

    Collaborators

    • dwebprotocol