• Reduce a fraction to its simplest form

    Parameters

    • numerator: number
    • denominator: number

    Returns [number, number]

    Example

    import { number } from "@rjweb/utils"

    number.reduce(5, 10) // [1, 2]
    number.reduce(10, 15) // [2, 3]

    Since

    1.12.18

    Supports

    nodejs, browser