Like
Install invert-by as a package?
Copied
npm i @bit/lodash.lodash.invert-by
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example modifieddraft
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
No preview available
chevron_left
chevron_right
invertBy (
object:
Object
,iteratee:
) : Function
Object
This method is like invert
except that the inverted object is generated
from the results of running each element of object
thru iteratee
. The
corresponding inverted value of each inverted key is an array of keys
responsible for generating the inverted value. The iteratee is invoked
with one argument: (value).
Example
Arguments
object:
Object
The object to invert.
iteratee:
Function
The iteratee invoked per element.
Returns
Object
Returns the new inverted object.