refacor all the things \o/

This commit is contained in:
uwap 2017-09-19 10:12:32 +02:00
parent d729d949bd
commit 538162d38c
15 changed files with 721 additions and 402 deletions

6
src/util.js Normal file
View file

@ -0,0 +1,6 @@
// @flow
import R from "ramda";
export const keyOf = <a,b> (map: Map<b,a>, value: a) : ?b =>
((keys) => keys[R.findIndex(k => map[k] == value, keys)])
(R.keys(map));