@geut/hyperdrive-promise
TypeScript icon, indicating that this package has built-in type declarations

3.1.3 • Public • Published

hyperdrive-promise

An async/await based wrapper for hyperdrive (v10+)

Build Status Greenkeeper badge

Install

$ npm install @geut/hyperdrive-promise

Usage

hyperdrive-promise its totally API compatible with hyperdrive v10+. It's only a promise based wrapper.

E.g.:

const hyperdrive = require('@geut/hyperdrive-promise')
const archive = hyperdrive('./my-first-hyperdrive') // content will be stored in this folder

try {
  await archive.writeFile('/hello.txt', 'world')
  const list = await archive.readdir('/')
  console.log(list) // prints ['hello.txt']
  const data = await archive.readFile('/hello.txt', 'utf-8')
  console.log(data) // prints 'world'
} catch (err) {
  console.log(err)
  // deal with the err
}

Release

npm version && npm publish

Contributing

👥 Ideas and contributions to the project are welcome. You must follow this guideline.

Sponsored By

Liberate Science

Package Sidebar

Install

npm i @geut/hyperdrive-promise

Weekly Downloads

22

Version

3.1.3

License

ISC

Unpacked Size

5.21 kB

Total Files

5

Last publish

Collaborators

  • geutuser
  • the-real-dk
  • tinchoz49
  • estebanprimost