cargo

HTML5 web storage module

npm install cargo
2 downloads in the last week
28 downloads in the last month

cargo

HTML5 web storage API JavaScript module

  • Abstracts the native storage APIs into a simple intuitive interface
  • Uses native localStorage and sessionStorage where available
  • Gracefully degrades to temporary storage
  • Works standalone or with build tools like browserify or ender

API (0.7)

cargo.local()

  • cargo.local(key?, value?)
    • cargo.local() get all
    • cargo.local(key) get
    • cargo.local(key, value) set
    • cargo.local(key, undefined) remove
  • cargo.local.get(key)
  • cargo.local.set(key, value)
  • cargo.local.remove(key)

cargo.session()

  • cargo.session(key?, value?)
    • cargo.session() get all
    • cargo.session(key) get
    • cargo.session(key, value) set
    • cargo.session(key, undefined) remove
  • cargo.session.get(key)
  • cargo.session.set(key, value)
  • cargo.session.remove(key)

Fund

Support this project by tipping the developer =)

License

MIT

npm loves you