]> git.r.bdr.sh - rbdr/dotfiles/blob
26f0ecacb8aef32fa6830c7604898e6a27ba2b30
[rbdr/dotfiles] /
1 'use strict';
2
3 var callable = require('./valid-callable')
4 , forEach = require('./for-each')
5
6 , call = Function.prototype.call;
7
8 module.exports = function (obj, cb/*, thisArg*/) {
9 var o = {}, thisArg = arguments[2];
10 callable(cb);
11 forEach(obj, function (value, key, obj, index) {
12 o[call.call(cb, thisArg, key, value, this, index)] = value;
13 }, obj);
14 return o;
15 };