JSPM

key-storage

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 222
  • Score
    100M100P100Q76850F

Require style local storage wrapper with cookies fallback

Package Exports

  • key-storage

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (key-storage) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Key-Storage

Features

  • Uses node.js require style modules
  • For browser, not node.js
  • Uses localStorage when possible
  • Uses cookies if localStorage is not available
  • Simple get, set and remove API

Installation

npm install key-storage

Usage

var storage = require('key-storage');

storage.set('key', 'value');
storage.get('key'); //=> 'value'
storage.remove('key');