join ignores non-string delimiter
excessivelyrigorous opened this issue · comments
excessivelyrigorous commented
Example:
_.join([0,0], 0) == "000"
Lazy([0,0]).join(0) == "0,0"
In this example I would say that Lazy is silently "overruling" my request of using a non-string delimiter -- which I think is bad.
Also, I assume that it is preferable in general that Lazy behaves equivalently to lodash when the function names are equal, which is not the case here.
Dan Tao commented
Without having looked at the code, my suspicion is this could be a bug with treating a falsey value as non-existent. What if you specify 1 as the delimiter instead of 0?
excessivelyrigorous commented
Yes that seems possible from my example.
But:
Lazy([0,0]).join(1); // 0,0
Lazy([1,2]).join(true); // 1,2
Dan Tao commented
Good find!