This question is locked. New answers and comments are not allowed.
I have found that there is an error within this file. An exception may not be thrown always, but if you try to call the function manually and pass as positive argument null, you will see it.
In case that the type is "numeric" and positive is null it will look for a "numericpositive" key in the cultureInfo. The problem is that this key does not exist and so positive gets a null value and the formatNumber function throws an exception later.
positive = positive || positive === 0 ? positive : cultureInfo[type + 'positive'];In case that the type is "numeric" and positive is null it will look for a "numericpositive" key in the cultureInfo. The problem is that this key does not exist and so positive gets a null value and the formatNumber function throws an exception later.