These are chat archives for ramda/ramda

Oct 2016
Markus Pfundstein
Oct 01 2016 13:59
This message was deleted
naive implementation ofc :-) but I think cool PoC
Jigar Gosar
Oct 01 2016 14:01
Weird error "Uncaught TypeError: Cannot read property 'length' of undefined(…)"
Jigar Gosar
Oct 01 2016 14:06
figure out, spec needs functions as values.
function applySpecWithProps(propNames, spec){
  function reducer(acc, propName)  {
    return _.merge(acc, _.objOf(propName, _.prop(propName)));
  var spec = _.reduce(reducer, spec, propNames);
  return _.applySpec(spec);

function applySpecWithProps2(propNames, spec){  
  var propSpec = _.zipObj(propNames,, propNames));
  return _.applySpec(_.merge(propSpec, spec));

var applySpecWithProps3 = function(propNames, spec){  
  return _.converge(_.merge, [_.applySpec(spec), _.pick(propNames)]);
three version of same function. Any feedback? opinions?
working code can be found at