Semi working state
This commit is contained in:
parent
3afba102b0
commit
2c433c7df0
3 changed files with 30 additions and 11 deletions
8
src/utils/keyOf.js
Normal file
8
src/utils/keyOf.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// @flow
|
||||
import _ from "lodash";
|
||||
|
||||
const keyOf = <a, b> (map: Map<a, b>, value: b): ?a => (
|
||||
_.findKey(map, (x) => x === value)
|
||||
);
|
||||
|
||||
export default keyOf;
|
||||
Loading…
Add table
Add a link
Reference in a new issue