3 ms·
Why so sour? It's a decently documented and tested utility library that's really closer to 35 SLOC, and is useful for those that would prefer not to write the m
by dhritzkiv 7y ago
Why so sour? It's a decently documented and tested utility library that's really closer to 35 SLOC, and is useful for those that would prefer not to write the multiplication logic, as simple as it may seem.
You're free to roll your own JS utility function that performs this multiplication.
Personally, I don't know why this is on HN as it's not an exceptional utility, and doesn't handle common currency manipulation frustrations (floating point rounding, bigint, decimal formatting, signs, etc.)