keys

  • function
can.Map.keys
 

Iterate over the keys of an Map.

can.Map.keys(map)

Parameters

  1. map {can.Map}

    the can.Map to get the keys from

Returns

{Array}

array An array containing the keys from map.

keys iterates over an map to get an array of its keys.

var people = new can.Map({
 a: 'Alice',
 b: 'Bob',
 e: 'Eve'
});

can.Map.keys(people); // ['a', 'b', 'e']