Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/onesy-me/storage

Storage
https://github.com/onesy-me/storage

amaui browser front-end frontend javascript js library localstorage sessionstorage storage storages typescript utils web

Last synced: 10 days ago
JSON representation

Storage

Awesome Lists containing this project

README

        



onesy logo

onesy Storage


Storage



MIT license    
Production ready    
UMD 3.2kb gzipped    
100% test cov    
Browser


Very simple code    
Modern code    
Junior friendly    
Typescript    
Made with :yellow_heart:


## Getting started

### Add

```sh
yarn add @onesy/storage
```

### Use

```javascript
import OnesyStorage from '@onesy/storage';

const onesyStorage = new OnesyStorage();

const value = { a: 4 };

// Add
onesyStorage.add('a', value);

// Get
onesyStorage.get('a');

// { a: 4 }

// Remove
onesyStorage.remove('a');

onesyStorage.get('a');

// null
```

### Dev

Install

```sh
yarn
```

Test

```sh
yarn test
```

### Prod

Build

```sh
yarn build
```