code: function mapItems(dict, fn, opt_this) {
      opt_this = opt_this || this;
      var result = {};
      var keys = Object.keys(dict);
      for (var i = 0; i < keys.length; i++) {
        var key = keys[i];
        result[key] = fn.call(opt_this, key, dict[key]);
      }
      return result;
    }
docs: Create a new dictionary with the same keys as the original dictionary
  mapped to the results of the provided function called on the corresponding
  entries in the original dictionary, i.e. result[key] = fn(key, dict[key])
  for all keys in dict (own enumerable properties only).
  
  Example:
  var srcDict = {a: 10, b: 15};
  var dstDict = mapItems(srcDict, function(k, v) { return 2 * v; });
  // srcDict is unmodified and dstDict is now equal to {a: 20, b: 30}.