JSPM

  • Created
  • Published
  • Downloads 23025
  • Score
    100M100P100Q151069F
  • License MIT

A JavaScript object storage library that enables local development.

Package Exports

  • @brighter/storage
  • @brighter/storage/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@brighter/storage) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@brighter/storage

This is a JavaScript object storage library that:

  • enables local development,
  • has a simple, concise API,
  • is well documented and tested against real infrastructure.

A list of supported object storage providers:

  • local and
  • any s3 compatible provider (AWS S3, Cloudflare R2, ...).

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: