Through my javascript library, I end up with a string that represents a number. Now I want to preform an addition on that number without it doing a string concatenation inst
It is reasonably safe to always use parseFloat even if you are given an integer. If you must use the appropriate conversion, you could match for a decimal point and use the appropriate function.