-
-
Notifications
You must be signed in to change notification settings - Fork 16
Home
As an interface for the HTML5 localStorage API, localDataStorage 1) lets you set and get keys while respecting native data types, 2) provides simple data scrambling, 3) intelligently compresses string data, 4) permits query by key (name) as well as query by (key) value, and 5) facilitates shared storage segmentation in the same domain.
Because JavaScript is running in a single thread in the browser, there are no race conditions or concerns with atomicity using localDataStorage. Further, all methods are synchronous. (Obviously, this is not referring to node.js, where single-threaded JavaScript is running on a server; or web workers, where multiple processes are running in a single thread.)
Both the keyname and its value are case-sensitive. The localDataStorage wrapper can be considered a superset of web storage, and it fires its own change events.
Data created under this software is considered to be generally incompatible with the HTML5 localStorage API. While keys can still be read (using getItem), since localDataStorage handles so much more than just strings, the default string values returned by localStorage won't make much sense.
When you're ready to include this in your next project, it's easy to get started.
General query:
haskey, hastype, hasval
setscramblekey / getscramblekey
Utility:
chopget
Array Keys:
push / pull, pullall poke contains where
Broadcasting:
broadcast
Data Transfer:
import / export
Duplicates:
countdupes, showdupes, listdupes
Internals:
cancrunch crunch / uncrunch
shufflestring / unshufflestring
Management:
keys
Memory Consumption:
Memory Quota:
showquota
Query:
haskey, hasval, hastype
setscramblekey / getscramblekey
Type Check:
isarray isbigint isboolean iscrunch
isdate isfloat isinteger isnull
Utility:
chopget copy softset rename
_set / _get _clear _key _remove
Management:
_keys
Type Check:
_isarray _isbigint _isboolean _iscrunch