0.1.0 • Published 7 years ago

@siggame/stockage v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

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