3.2.0 • Published 4 years ago

@tomnicolosi/storage-wrap v3.2.0

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

storage-wrap

A thin wrapper for the Web Storage API.

Uses code from MDN to check for storage availability prior to running storage methods (Reference).

Basic usage:

Installation via npm:

npm i @tomnicolosi/storage-wrap

Usage in JavaScript file:

import StorageWrap from "@tomnicolosi/storage-wrap;

// Store a 'test-value' equal to 'hello' in localStorage.

function store_test () {
    StorageWrap.storage_write("test-value", "hello");
}

store_test();

// Read the value

function store_read () {
    return StorageWrap.storage_read("test-value");
}

console.log(store_read); // "hello"
3.2.0

4 years ago

3.1.0

4 years ago

3.0.0

4 years ago

2.0.0

5 years ago

1.0.0

5 years ago