Class: shaka.util.MapUtils

A set of map/object utility functions.

Methods

(static) empty(object) → {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>