Reduce production built size

This commit is contained in:
uwap 2018-02-14 06:23:48 +01:00
parent a96fa1622b
commit f4d1cb7e1e
13 changed files with 56 additions and 38 deletions

View file

@ -1,8 +1,8 @@
// @flow
import _ from "lodash";
import findKey from "lodash/findKey";
const keyOf = <a, b> (map: Map<a, b>, value: b): ?a => (
_.findKey(map, (x) => x === value)
findKey(map, (x) => x === value)
);
export default keyOf;

View file

@ -1,6 +1,5 @@
// @flow
import * as React from "react";
import _ from "lodash";
import { getInternals, getActuals } from "utils/state";
import type { Control } from "config/types";

View file

@ -1,8 +1,8 @@
// @flow
import _ from "lodash";
import mapValues from "lodash/mapValues";
export const getInternals = (state: State): Map<string, Internal> =>
_.mapValues(state, (x) => x.internal || x.actual);
mapValues(state, (x) => x.internal || x.actual);
export const getActuals = (state: State): Map<string, Actual> =>
_.mapValues(state, (x) => x.actual);
mapValues(state, (x) => x.actual);