src/js/maps.js
/**
* Map function for maps / Objects
* @param {Function} Fun(Key,Value) -> Value
* @param {Map/Object} Map a map of Key Value pairs
* @return {Map/Object} new Map
*/
Map function for maps / Objects
Map function for maps / Objects
function map(Fun,Map) {
  var R = {}, i, Keys = Object.keys(Map)
  for (i = 0; i < Keys.length; i++) {
    R[Keys[i]] = Fun(Keys[i],Map[Keys[i]]);
  }
  return R;
}
function map ( Fun , Map ) { var R = { } , i , Keys = Object . keys ( Map ) for ( i = 0 ; i < Keys . length ; i ++ ) { R [ Keys [ i ] ] = Fun ( Keys [ i ] , Map [ Keys [ i ] ] ) ; } return R ; }
Map function for maps / Objects
Map function for maps / Objects