You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
495 B
17 lines
495 B
import baseInverter from './_baseInverter.js'; |
|
|
|
/** |
|
* 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), {}); |
|
}; |
|
} |
|
|
|
export default createInverter;
|
|
|