fastlocalstorage

1.0.2 • Public • Published

fastlocalstorage

Fast storage is a cache layer over localStorage, which makes read speeds 10x faster

Behind the scenes, we are using localStorage execpt when we try to read/write the data to the storage, we create a cache on memory

Installation

npm install --save fastlocalstorage

In your code

import fastlocalstorage from "fastlocalstorage"
window.fastLocalStorage = fastlocalstorage

Usage

It is exactly the same as localStorage

  1. window.fastLocalStorage.getItem('key')
  2. window.fastLocalStorage.setItem('key',val)
  3. window.fastLocalStorage.clear()
  4. window.fastLocalStorage.removeItem('key')

Speed

Write speed is about the same Read speed is 10x faster

There are few tests also added you can run them and check in a browser env

Package Sidebar

Install

npm i fastlocalstorage

Weekly Downloads

5

Version

1.0.2

License

ISC

Unpacked Size

2.48 kB

Total Files

4

Last publish

Collaborators

  • theavijitsarkar