5 ms·
Serious question, why does lodash.isNull exist?
- cratermoon 4y agoBecause 'null' in Javascript isn't intuitive https://www.destroyallsoftware.com/talks/wat https://www.destroyallsoftware.com/talks/wat
- Khelavaster 4y agoExactly. This emphasized that '===' semantically means 'is'; '==' means 'equals'.
- db48x 4y agoSo that you can refer to it by name, and do things like `_.remove(myArray, _.isNull)` to get an array with no null values.