1.0.5 • Published 3 years ago

@revanode/reva-nls v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
3 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

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago