expirable-storage
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Expirable storage

OSS Template Version Contributor Covenant

About The Project

Expirable data storage based on localStorage and sessionStorage.

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Be sure you use latest stable version of npm:

npm install npm@latest -g

Usage

npm install expirable-storage
# Or
yarn add expirable-storage
import {
  expirableLocalStorage,
  expirableSessionStorage,
} from "expirable-storage";
const expires = 900; // 900 seconds (15 minutes)

expirableLocalStorage.setItem("key1", "value1", expires);
expirableLocalStorage.getItem("key1");

expirableSessionStorage.setItem("key2", "value2", expires);
expirableSessionStorage.getItem("key2");

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. For detailed contributing guidelines, please see CONTRIBUTING.md

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Valentin Podkamennyi - @vpodk

Project Link: https://github.com/wayfair-incubator/expirable-storage

Acknowledgements

This template was adapted from https://github.com/othneildrew/Best-README-Template.

Package Sidebar

Install

npm i expirable-storage

Weekly Downloads

55,832

Version

1.0.0

License

MIT

Unpacked Size

8.36 kB

Total Files

6

Last publish

Collaborators

  • wayfair
  • vpodk
  • sumanas27