parse-fraction
Parse numerator and denominator from a string.
const parseFract = // [1, 2] // [1, 3] // [7, 8] // [1, 4] // [13, 15] // [19, 21] // [1, 1] // [1 , 1000000] // [5, 6] // [12, 100] // [12, 100] // [12, 100] // [Math.PI * 2, (1 + Math.sqrt(5)) / 2] // [123456, 123456] // [50, 50]
parseFraction(str, locale?)
Return [numerator, denominator]
couple from a string. Optionally pass locale object for other than en
locales, see en locale example.
License
(c) 2017 Dima Yv. MIT License