map-keys.js #1

  • //
  • guest/
  • jen_bottom/
  • ember/
  • tutorial/
  • testapp/
  • node_modules/
  • es5-ext/
  • object/
  • map-keys.js
  • View
  • Commits
  • Open Download .zip Download (408 B)
"use strict";

var callable = require("./valid-callable")
  , forEach  = require("./for-each")
  , call     = Function.prototype.call;

module.exports = function (obj, cb /*, thisArg*/) {
	var result = {}, thisArg = arguments[2];
	callable(cb);
	forEach(
		obj,
		function (value, key, targetObj, index) {
			result[call.call(cb, thisArg, key, value, this, index)] = value;
		},
		obj
	);
	return result;
};
# Change User Description Committed
#1 23539 jenbottom Adding the basic code for ember test appk, created with 'ember new' command