Class: shaka.util.MapUtils

A set of map/object utility functions.

Methods

(private, static) asMap_(objectnon-null) → (non-null) {Map.<KEY, VALUE>}

Parameters:
Name Type Description
object Object.<KEY, VALUE>
Source:
Returns:
Type
Map.<KEY, VALUE>

(private, static) asObject_(mapnon-null) → (non-null) {Object.<KEY, VALUE>}

Parameters:
Name Type Description
map Map.<KEY, VALUE>
Source:
Returns:
Type
Object.<KEY, VALUE>

(static) empty(objectnon-null) → {boolean}

Returns true if the map is empty; otherwise, returns false.
Parameters:
Name Type Description
object Object.<KEY, VALUE>
Source:
Returns:
Type
boolean

(static) every(objectnon-null, callback) → {boolean}

Returns true if every entry matches the predicate.
Parameters:
Name Type Description
object Object.<KEY, VALUE>
callback function(KEY, VALUE):boolean
Source:
Returns:
Type
boolean

(static) forEach(objectnon-null, callback)

Invokes the callback for each entry in the map.
Parameters:
Name Type Description
object Object.<KEY, VALUE>
callback function(KEY, VALUE)
Source:

(static) map(objectnon-null, callback) → (non-null) {Object.<KEY, OUTPUT>}

Converts the values in the given Map to a different value.
Parameters:
Name Type Description
object Object.<KEY, VALUE>
callback function(VALUE, KEY=):OUTPUT
Source:
Returns:
Type
Object.<KEY, OUTPUT>

(static) values(objectnon-null) → (non-null) {Array.<VALUE>}

Gets the map's values.
Parameters:
Name Type Description
object Object.<KEY, VALUE>
Source:
Returns:
Type
Array.<VALUE>