Closed LarryBattle closed 11 years ago
For Ratio.js version 0.3.11, Ratio.guessType() thinks that most strings with "\" is a fraction.
Ratio.guessType()
Example
Ratio.guessType("1 // 2") == "fraction" Ratio.guessType("1 /\ 2") == "fraction" Ratio.guessType("1 //\\ 2") == "fraction"
Use Ratio.prototype.isNaN() to check if the parsed input converts to a fraction.
Ratio.prototype.isNaN()
Example:
Ratio.parse("1//2").isNaN() === true Ratio.parse("1/2").isNaN() === false
For Ratio.js version 0.3.11,
Ratio.guessType()
thinks that most strings with "\" is a fraction.Example