{"ast":null,"code":"import arrayAggregator from './_arrayAggregator.js';\nimport baseAggregator from './_baseAggregator.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n  return function (collection, iteratee) {\n    var func = isArray(collection) ? arrayAggregator : baseAggregator,\n      accumulator = initializer ? initializer() : {};\n    return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n  };\n}\nexport default createAggregator;","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}