Created
July 31, 2017 01:55
-
-
Save Emilios1995/a8307829eb77f6cd3b7662ffef9bc5a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const normalize = (spec, input) => | |
Object.keys(spec).reduce( | |
(acc, x) => R.assoc(x, R.propOr(null, x, input), acc), | |
{} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment