Closed shaylh closed 8 years ago
don't know how pick
is used in rt
, but perhaps it's enough to replace it with pickBy
?
Unfortunately no, because _.pickBy was only introduced in lodash 4.5.0.
I mean, is the new pickBy
equivalent to the old pick
? If so, at we could a switch or something like that.
any ideas about how to solve this issue? Today I spent a long time debugging why my classes weren't working ...
_({foo: true, bar: false}).transform(function(res, value, key){ if(value){ res.push(key); } }, []).value().join(' ');
A bit ugly, I guess it could be improved, though it does the work on both lodash versions :)
I have the same problem. Could you close the issue? please :)
@mariawix , can you please also update the NPM repository? :)
Looks like lodash's implementation of "_.pick" changed in 4.5.0, and now
_.pick({ foo: true }, _.identity)
returns an empty object.
Codepen example with lodash 3.10.0 Codepen example with lodash 4.5.0
:)