-
-
Notifications
You must be signed in to change notification settings - Fork 16
.forceset
localDataStorage.forceset( keyName, value )
This method stores value under keyName, creating a new key if necessary, where the key prefix is prepended to keyName, but the data type is ignored (value is always stored as String). Data obfuscation is not possible.
This is equivalent to the native localStorage.setItem method, however key prefixing is nevertheless enforced.
This will overwrite an existing value for keyName. If this happens, the prior value cannot be retrieved.
The value of the updated key is returned when this method executes.
EXAMPLES:
● localData.forceset( 'lsAPI-key1', 'string data' )
● localData.forceset( 'lsAPI-key2', 99.44 )
● localData.forceset( 'lsAPI-key3', [1,3,5,7,9] )
🌐 This method may fire an event allowing you to monitor the changed key.
✨ The complement to this is forceget.
📝 NOTE: Key values stored by this method can also be retrieved using get.
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