You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
471 B
23 lines
471 B
2 years ago
|
/*!
|
||
|
* object.map <https://github.com/jonschlinkert/object.map>
|
||
|
*
|
||
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||
|
* Released under the MIT License.
|
||
|
*/
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
var makeIterator = require('make-iterator');
|
||
|
var forOwn = require('for-own');
|
||
|
|
||
|
module.exports = function(obj, fn, thisArg) {
|
||
|
var iterator = makeIterator(fn, thisArg);
|
||
|
var result = {};
|
||
|
|
||
|
forOwn(obj, function(value, key, orig) {
|
||
|
result[key] = iterator(value, key, orig);
|
||
|
});
|
||
|
|
||
|
return result;
|
||
|
};
|