Skip to content

JavaScript utility that provides a common interface in communicating with Google Storage, AWS S3, and local storage.

Notifications You must be signed in to change notification settings

siggame/stockage

Repository files navigation

siggame/stockage

JavaScript utility that provides a common interface in communicating with Google Storage, AWS S3, and local storage.

Travis Dependencies NPM Version NPM Total Downloads

Table Of Contents

Description

This library is to act as a common interface to allow us to save, retrieve, and update arbitrary files from a cloud service.

Getting Started

npm install siggame/stockage#stable
import * as stockage from "@siggame/stockage";

Usage

Using Local Stockage

// New instance
const stock = new stockage.LocalStockage();

// Writing data
const id = await stock.write("Hello, World");
const id = await stock.writeBuffer(buffer);
const id = await stock.writeJSON({hello: "world"});

// Reading data
const data = await stock.read(id);
const data = await stock.readBuffer(id);
const data = await stock.readJSON(id);

Contributors

License

View our LICENSE.md

Contributing

View our CONTRIBUTING.md

About

JavaScript utility that provides a common interface in communicating with Google Storage, AWS S3, and local storage.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published