-
-
Notifications
You must be signed in to change notification settings - Fork 15
Prefixes
When on the same domain, prefixes are the only thing that help keep your storage keys from being overwritten by someone else's use of localStorage. Prefixes also let you instantiate more than one copy of localDataStorage and use the same keys with each, provided you specify unique values.
Prefixes are strongly encouraged but are not mandatory and must be specified when localDataStorage starts up.
EXAMPLES:
Start the software specifying a prefix
z = localDataStorage( 'mac' ); -->
localDataStorage instantiated. The specified prefix (mac.) adds 4 bytes to every key name (stored using 8 bytes).
Start the software forcing no prefix
z = localDataStorage( '' ); -->
Empty prefix given (), but a usable prefix is strongly recommended to organize keys!
localDataStorage instantiated. The specified prefix () adds 0 bytes to every key name (stored using 0 bytes).
Start the software getting a random prefix
z = localDataStorage(); -->
No prefix specified. Creating a random prefix --> 1588540882487:252103633.
localDataStorage instantiated. The random prefix (1588540882487:252103633.) adds 24 bytes to every key name (stored using 48 bytes).
When starting localDataStorage, you may also use a few switches.
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