# workshopper-adventure-storage

> Storage system for workshopper-adventure to store the preferences.

Latest version **3.0.1** (published 2020-07-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install workshopper-adventure-storage
pnpm add workshopper-adventure-storage
yarn add workshopper-adventure-storage
bun add workshopper-adventure-storage
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2020-07-03 |
| First published | 2016-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 11.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ryan Kois |
| Maintainers | julianduque, kid-icarus, tdd |
| Keywords | workshopper, util |

## Links

- npm: https://www.npmjs.com/package/workshopper-adventure-storage
- Repository: https://github.com/workshopper/workshopper-adventure-storage
- Homepage: https://github.com/workshopper/workshopper-adventure-storage#readme
- Issues: https://github.com/workshopper/workshopper-adventure-storage/issues
- npm.io page: https://npm.io/package/workshopper-adventure-storage

## Dependencies (1)

- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 3.0.1 (latest) — 2020-07-03
- 3.1.0 — 2020-07-03
- 3.0.0 — 2016-11-16
- 2.0.3 — 2016-11-13
- 2.0.2 — 2016-11-12
- 2.0.0 — 2016-11-12
- 1.0.3 — 2016-09-20
- 1.0.2 — 2016-09-20
- 1.0.1 — 2016-09-20
- 0.0.3 — 2016-09-20
- 0.0.2 — 2016-09-19
- 0.0.1 — 2016-09-19

## README

# workshopper-adventure-storage

[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url]
[![NPM deps][deps-image]][deps-url] [![NPM dev devp][dev-deps-image]][dev-deps-url]

Simple storage for [workshopper-adventure](https://github.com/workshopper/workshopper-adventure)

Originally included as part of workshopper-adventure, mostly written by [Martin Heidegger](https://github.com/martinheidegger)

Based on prior work of:
[@substack](https://github.com/substack)
[@rvagg](https://github.com/rvagg)

## Install

```
npm install workshopper-adventure-storage --save
```

```js
const createStorage = require('workshopper-adventure-storage')
```

## Usage


### createStorage.userDir

A default path to store data in.

### createStorage([dir[, ...]])

Accepts a sequence of paths for `path.resolve` to use as the storage directory.

```js
const createStorage = require('workshopper-adventure-storage')
const storage = createStorage(createStorage.userDir, 'my-workshopper')
```

## Properties

### storage.dir

The path to store data in.

## Methods

### storage.save('name', data)

JSON encodes and writes a file to the storage directory. The following will
save the file as `index.json`.

```js
const data = {
  foo: 'bar'
}
storage.save('index', data)
```

## storage.get('name')
Retrieves and unserializes a file from storage.

```js
var data = storage.get('index')
```

## storage.reset()
Clears the storage directory.

```js
storage.reset()
```

[downloads-image]: http://img.shields.io/npm/dm/workshopper-adventure-storage.svg
[npm-url]: https://npmjs.org/package/workshopper-adventure-storage
[npm-image]: http://img.shields.io/npm/v/workshopper-adventure-storage.svg

[deps-url]:https://david-dm.org/workshopper/workshopper-adventure-storage
[deps-image]: https://img.shields.io/david/workshopper/workshopper-adventure-storage.svg

[dev-deps-url]: https://david-dm.org/workshopper/workshopper-adventure-storage?type=dev
[dev-deps-image]: https://img.shields.io/david/dev/workshopper/workshopper-adventure-storage.svg

[travis-url]: https://travis-ci.org/workshopper/workshopper-adventure-storage
[travis-image]: https://travis-ci.org/workshopper/workshopper-adventure-storage.png?branch=master
[coveralls-url]: https://coveralls.io/github/workshopper/workshopper-adventure-storage?branch=master
[coveralls-image]: https://coveralls.io/repos/github/workshopper/workshopper-adventure-storage/badge.svg?branch=master

---
_Source: https://npm.io/package/workshopper-adventure-storage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
