2.0.2 • Published 8 years ago

sebastiendaniel-adt v2.0.2

Weekly downloads
9
License
MIT
Repository
github
Last release
8 years ago

Getting started


Classes

Typedefs

Dictionary

Kind: global class
Summary: the Dictionary stores key:value pairs of data. The keys are strings, the data can be anything. A Dictionary is fast for create/read/update/remove actions, as well is searching for entries that can be uniquely identified by their key

Dictionary.getValues() ⇒ Array

Kind: static method of Dictionary
Summary: returns an array of the values contained in the Dictionary

Dictionary.getKeys() ⇒ Array

Kind: static method of Dictionary
Summary: return an array of all existing keys in the dictionary

Dictionary.get(key) ⇒ *

Kind: static method of Dictionary
Summary: returns the stored value, identified by its key, otherwise undefined

ParamType
keykey

Dictionary.set(key, value) ⇒ Dictionary

Kind: static method of Dictionary

ParamTypeDescription
keykey
value*value to bind to the key

Dictionary.remove(key) ⇒ Dictionary

Kind: static method of Dictionary
Summary: deletes the key:value pair from the Dictionary's data, if present.

ParamType
keykey

Dictionary.hasKey(key) ⇒ boolean

Kind: static method of Dictionary
Summary: tests if the given key exists in the Dictionary

ParamType
keykey

Dictionary.hasValue(value) ⇒ boolean

Kind: static method of Dictionary
Summary: searches the entire dictionary until the value is found (strict equality)

ParamTypeDescription
value*value to find

Dictionary.forEach(cb) ⇒ Dictionary

Kind: static method of Dictionary
Summary: passes each pair in the dictionary through the provided callback function. The callback is called with four arguments (key, value, index, array), where array is the array-representation of the Dictionary's data

ParamTypeDescription
cbfunctioncallback

Dictionary.clear() ⇒ Dictionary

Kind: static method of Dictionary
Summary: removes all pairs in the dictionary. This is a fairly slow operation, use with caution.

Dictionary.isEmpty() ⇒ boolean

Kind: static method of Dictionary
Summary: tests if the dictionary contains any keys

key

Kind: global typedef
Summary: used to uniquely identify an entry. All keys are coerced into strings.