• Generate non-contiguous ranges of values by mapping integer values to constant

    Example

    // generate alphanumeric values (a-z0-9)
    mapToConstant(
    { num: 26, build: v => String.fromCharCode(v + 0x61) },
    { num: 10, build: v => String.fromCharCode(v + 0x30) },
    )

    Remarks

    Since 1.14.0

    Type Parameters

    • T

    Parameters

    • Rest ...entries: {
          build: ((idInGroup: number) => T);
          num: number;
      }[]

    Returns Arbitrary<T>

Generated using TypeDoc