1.0.5 • Published 2 years ago

@revanode/reva-nls v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

reva-nls

nls === Node Local Storage

Docs

localStorage usage example:

const localStorage = require('@revanode/reva-nls');
localStorage.configure({
  localStorageSavePath: './my-local-storage.json',
}); // if you dont configure save path, it defaults to ./localStorage.json
localStorage.init(); // setItem, getItem, removeItem, and clearItem will not be available if you don't run this
localStorage.setItem('hello', 'world');
console.log(localStorage.getItem('hello')); // world
console.log(localStorage.getItem('nonexistent')); // null

And unlike the browser's actual localStorage API, it supports other types as the value to be set!

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago