@brighter/storage
TypeScript icon, indicating that this package has built-in type declarations

1.5.2 • Public • Published

@brighter/storage

This is the core object storage library.

Instead of manually installing and injecting the dependencies, you'll most likely want to use one of the following storage adapters that come pre-bundled with everything required:

If you still wish to manually install and inject the dependencies, please proceed.

Quick Start

Installation, using npm:

npm i @brighter/storage

Usage:

import { Storage } from '@brighter/storage'

const storage = Storage({
  type: 'local',
  path: '/tmp/storage'
})

const main = async () => {
  await storage.write('msg', 'hi')
  const msg = await storage.read('msg')
  console.log(msg)
}

main().catch(console.error)

For more information:

Package Sidebar

Install

npm i @brighter/storage

Weekly Downloads

2

Version

1.5.2

License

MIT

Unpacked Size

30.1 kB

Total Files

23

Last publish

Collaborators

  • brihter