Front end of the Slack clone application.

123456789101112131415
  1. "use strict";
  2. var callable = require("./valid-callable")
  3. , forEach = require("./for-each")
  4. , call = Function.prototype.call;
  5. module.exports = function (obj, cb /*, thisArg*/) {
  6. var result = {}, thisArg = arguments[2];
  7. callable(cb);
  8. forEach(obj, function (value, key, targetObj, index) {
  9. result[key] = call.call(cb, thisArg, value, key, targetObj, index);
  10. });
  11. return result;
  12. };