DEV Community

loading...

Discussion on: It's time to let go of lodash

michaelcurrin profile image
Michael

Ok thanks. My original point was not on the best way to do truthiness though but the fact that these two are not interchangeable as you had suggested, so was recommending it be fixed.

_.isBoolean(true); //true
Boolean(true); //true - same as above line
Enter fullscreen mode Exit fullscreen mode
_.isBoolean(false); //true
Boolean(false); //false. But different result to above line and therefore not equivalent
Enter fullscreen mode Exit fullscreen mode