Namespace

stat_map

stat_map

Map finder

Methods

static getItemKey(item) → {object}

Retrieve the key from an element key to value

Parameters:
Name Type Description
item object

Current item containing the key

Item Key

object

static key2value(map, key, isLastDefaultopt, fCmpopt) → {object}

Retrieve the value corresponding to a key in a sorted map key to value (use stat_qfsa.qfind)

Parameters:
Name Type Attributes Default Description
map array

Array of elements key to value

key object

Key to search

isLastDefault boolean <optional>
false

true if last element must be returned when key not found

fCmp function <optional>
stat_qfsa.stdCompare

Comparison function.

Corresponding value

object