Bez popisu

index.js 471B

12345678910111213141516171819202122
  1. /*!
  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. 'use strict';
  8. var makeIterator = require('make-iterator');
  9. var forOwn = require('for-own');
  10. module.exports = function(obj, fn, thisArg) {
  11. var iterator = makeIterator(fn, thisArg);
  12. var result = {};
  13. forOwn(obj, function(value, key, orig) {
  14. result[key] = iterator(value, key, orig);
  15. });
  16. return result;
  17. };