1
0
mirror of https://github.com/thangisme/notes.git synced 2024-10-31 23:18:53 -04:00
notes/node_modules/lodash/_createInverter.js
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00

18 lines
497 B
JavaScript

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;