aboutsummaryrefslogtreecommitdiff
path: root/node_modules/lodash/_createInverter.js
blob: 6c0c56299bdf89d9d71ed08afa372c82bdbe81a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var baseInverter = require('./_baseInverter');

/**
 * Creates a function like `_.invertBy`.
 *
 * @private
 * @param {Function} setter The function to set accumulator values.
 * @param {Function} toIteratee The function to resolve iteratees.
 * @returns {Function} Returns the new inverter function.
 */
function createInverter(setter, toIteratee) {
  return function(object, iteratee) {
    return baseInverter(object, setter, toIteratee(iteratee), {});
  };
}

module.exports = createInverter;