New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@web4/bitdrive-promise

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web4/bitdrive-promise

An async/await based wrapper for bitdrive

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

bitdrive-promise

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

Install

$ npm install @web4/bitdrive-promise

Usage

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

E.g.:

const bitdrive = require('@web4/bitdrive-promise')
const archive = bitdrive('./my-first-bitdrive') // 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

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

Keywords

bit

FAQs

Package last updated on 27 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts