blob: 0baef884480764cf1cc9847d83ad816f0bb82fb7 [file] [log] [blame]
Leo Repp58b9f112021-11-22 11:57:47 +01001/*!
2 * object.map <https://github.com/jonschlinkert/object.map>
3 *
4 * Copyright (c) 2014-2017, Jon Schlinkert.
5 * Released under the MIT License.
6 */
7
8'use strict';
9
10var makeIterator = require('make-iterator');
11var forOwn = require('for-own');
12
13module.exports = function(obj, fn, thisArg) {
14 var iterator = makeIterator(fn, thisArg);
15 var result = {};
16
17 forOwn(obj, function(value, key, orig) {
18 result[key] = iterator(value, key, orig);
19 });
20
21 return result;
22};