Skip to content

.softset

W. ❝Mac❞ McMeans edited this page Jan 2, 2024 · 15 revisions

localDataStorage.softset( keyName, value )

This method stores value under keyName, creating a new key if necessary, but does not overwrite an existing value. In other words, this can only create a new (unobfuscated) key, and will ignore all existing keys having keyName.

This method is useful when the requirement involves preventing an existing key from being overwritten without having to test for existence (for example, calling haskey) prior to changing values.

EXAMPLES:

● localData.set( 'key2', 1200.0047 )
● localData.softset( 'key2', 'test' )
● localData.get( 'key2' )   -->   1200.0047

The value of keyName is returned when this method executes.

🌐 This method may fire an event allowing you to monitor a new key.

🏿 The corresponding Memory Key method is _softset.

localStorage Keys

The usual suspects:

set / get      clear      key      remove

The esoteric ones:

Array Keys:
push / pull, pullall      poke      contains      where

Broadcasting:
broadcast

Bypass:
forceset / forceget

Data Transfer:
import / export

Duplicates:
countdupes, showdupes, listdupes

Internals:
cancrunch      crunch / uncrunch

shufflestring / unshufflestring

xorstring

Management:
keys

Memory Consumption:

Memory Quota:
showquota

Query:
haskey, hasval, hastype

Security:
safeset / safeget

setscramblekey / getscramblekey

Type Check:
isarray      isbigint      isboolean      iscrunch

isdate      isfloat      isinteger      isnull

isnumber      isobject      isstring

showtype

Utility:
chopget      copy      softset      rename

Properties:

channel      length      quota      version

Settings:

verbosity

Memory Keys

Standard:

_set / _get      _clear      _key      _remove

Unconventional:

Data Sync:
_backup / _restore

Management:
_keys

Security:
_safeset / _safeget

Type Check:
_isarray      _isbigint      _isboolean      _iscrunch

_isdate      _isfloat      _isinteger      _isnull

_isnumber      _isobject      _isstring

_showtype

Utility:
_chopget      _copy      _softset      _rename

Clone this wiki locally