GoScrobble/web/node_modules/lodash-es/_createInverter.js

18 lines
495 B
JavaScript
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
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;