Prelude API
    Preparing search index...

    Function properDivisors

    • Generates all proper divisors of a number (divisors that are less than n). A proper divisor of n is any positive integer that divides n evenly, except for n itself.

      Parameters

      • n: number

        The number to find proper divisors for

      Returns Generator<number, void, unknown>

      Each proper divisor of n in ascending order

      G.pipe(
      G.properDivisors(12),
      G.array
      ) // [1, 2, 3, 4, 6]