-
-
Notifications
You must be signed in to change notification settings - Fork 16
.contains
localDataStorage.contains( arrayKeyName, value )
This checks all elements of arrayKeyName, an Array Key, for the existence of value and, if found, returns true. If value is not contained in the array, false is returned. The data type of value must match.
EXAMPLE:
🔹 Existing Array Key called 'cars' having value ['Ford', Chrysler', 'Nissan', 'BMW', 'Peugot', 'Saab', 'Citroën']:
Check for a Saab:
● localData.contains( 'cars', 'Saab' ); --> true
📝 NOTE: This method is specific to Array Keys and will fail if used on any other key type. This method is related to where. If Array Keys are not involved, this is also similar to hasval (which checks the entire store). Array Keys use one-based array indices.
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