HEX
Server: Apache
System: Linux webd004.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: frenchy (106757)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/frenchy/www/extracts/var/www/french-american.org/current/node_modules/collection-map/index.js
/*!
 * collection-map <https://github.com/jonschlinkert/collection-map>
 *
 * Copyright (c) 2015, 2017, Jon Schlinkert.
 * Released under the MIT License.
 */

'use strict';

var makeIterator = require('make-iterator');
var forOwn = require('for-own');
var map = require('arr-map');

module.exports = function(collection, fn, thisArg) {
  if (!Array.isArray(collection)) {
    var iterator = makeIterator(fn, thisArg);
    var result = [];

    forOwn(collection, function(value, key) {
      result.push(iterator(value, key, collection));
    });
    return result;
  }
  return map(collection, fn, thisArg);
};