ts-data-forge
    Preparing search index...
    • Creates an array of numbers within a specified range with optional step.

      Type Parameters

      • S extends
            | 0
            | 1
            | 2
            | 3
            | 4
            | 5
            | 6
            | 7
            | 8
            | 9
            | 10
            | 11
            | 12
            | 13
            | 14
            | 15
            | 16
            | 17
            | 18
            | 19
            | 20
            | 21
            | 22
            | 23
            | 24
            | 25
            | 26
            | 27
            | 28
            | 29
            | 30
            | 31
            | 32
            | 33
            | 34
            | 35
            | 36
            | 37
            | 38
            | 39
      • E extends
            | 0
            | 1
            | 2
            | 3
            | 4
            | 5
            | 6
            | 7
            | 8
            | 9
            | 10
            | 11
            | 12
            | 13
            | 14
            | 15
            | 16
            | 17
            | 18
            | 19
            | 20
            | 21
            | 22
            | 23
            | 24
            | 25
            | 26
            | 27
            | 28
            | 29
            | 30
            | 31
            | 32
            | 33
            | 34
            | 35
            | 36
            | 37
            | 38
            | 39

      Parameters

      • start: S
      • end: E
      • Optionalstep: 1

      Returns RangeList<S, E>

      const ascending = Arr.range(asUint32(1), asUint32(5));
      const empty = Arr.range(asUint32(2), asUint32(2));

      assert.deepStrictEqual(ascending, [1, 2, 3, 4]);
      assert.deepStrictEqual(empty, []);
    • Creates an array of numbers within a specified range with optional step.

      Parameters

      • start: SafeUintWithSmallInt
      • end: SafeUintWithSmallInt
      • Optionalstep: PositiveSafeIntWithSmallInt

      Returns readonly SafeUint[]

      const ascending = Arr.range(asUint32(1), asUint32(5));
      const empty = Arr.range(asUint32(2), asUint32(2));

      assert.deepStrictEqual(ascending, [1, 2, 3, 4]);
      assert.deepStrictEqual(empty, []);
    • Creates an array of numbers within a specified range with optional step.

      Parameters

      • start: SafeIntWithSmallInt
      • end: SafeIntWithSmallInt
      • Optionalstep: NonZeroSafeIntWithSmallInt

      Returns readonly SafeInt[]

      const ascending = Arr.range(asUint32(1), asUint32(5));
      const empty = Arr.range(asUint32(2), asUint32(2));

      assert.deepStrictEqual(ascending, [1, 2, 3, 4]);
      assert.deepStrictEqual(empty, []);