ramda / ramda

:ram: Practical functional Javascript

Home Page:https://ramdajs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

0.30.0 `propEq` is wrong

fangjc1986 opened this issue · comments

demo:

const abby = {name: 'Abby', age: 7, hair: 'blond'};
const fred = {name: 'Fred', age: 12, hair: 'brown'};
const rusty = {name: 'Rusty', age: 10, hair: 'brown'};
const alois = {name: 'Alois', age: 15, disposition: 'surly'};
const kids = [abby, fred, rusty, alois];
const hasBrownHair = R.propEq('hair', 'brown');

const r = R.filter(hasBrownHair, kids); 

// should: [ fred , rusty ]
// actual result : []

document.body.innerHTML = JSON.stringify(r, null, 2);

codepen:

https://codepen.io/fangjc1986/pen/JjqYRwj?editors=1010