4 ms·
> Having the meaning of the first argument change because you passed an optional second argument is very odd. Is it, though? And yes, I would totally just mak
by whiddershins 4y ago
> Having the meaning of the first argument change because you passed an optional second argument is very odd.
Is it, though?
And yes, I would totally just make it so the function detects whether I am passing in an object or an array of objects and respond accordingly.
I feel like I got this pattern from jQuery or something. Seems very normal for a good library.