Skip to content
W. "Mac" McMeans edited this page Jul 12, 2022 · 10 revisions

localDataStorage.copy( sourceKeyName, destinationKeyName )

This method creates a new key, destinationKeyName, from the value stored under sourceKeyName, respecting the data type.

Existing keys cannot be overwritten.

EXAMPLES:

● localData.set( 'key1', 14.99 )
● localData.copy( 'key1', 'key99' )
● localData.get( 'key99' )   -->   14.99

🌐 This method may fire an event allowing you to monitor the key change.

🏿 The corresponding Memory Key method is _copy.

⚠️ Obfuscated keys cannot be successfully copied over to a new key. When a global scramble key has been employed in their creation, the interface can detect this and throw a warning. However, there is no way the library can detect when a user scramble key was used. In this case, the copy operation will take place, but the destinationKeyName will contain a value that cannot be retrieved, effectively polluting the store with a useless key.

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