localstorage-var
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

LocalStorage Var

Implementation of the mini-events variable interface using localStorage

Usage

Call the exported function with a string key to get a function which has the same type as variable from mini-events.

const [set, { get, changed }] = localStorageVar('myState')('initialState')

See @lbfalvy/mini-events for examples on how to use the variable interface.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i localstorage-var

Weekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

14.8 kB

Total Files

6

Last publish

Collaborators

  • lbfalvy