rjhilgefort
6/29/2018 - 4:31 PM

defaults

// :: {String a: *} -> {a: *}
const defaults = R.curry((spec, data) =>
  R.mergeWith(
    R.useWith(R.flip(R.defaultTo), [nullIfEmpty, R.identity]),
    data,
    spec,
  ),
);