aboutsummaryrefslogtreecommitdiff
path: root/test/support/times.ts
blob: ac45f31d124bcff35a04f7ca243a85efb4ca4602 (plain)
1
2
3
4
5
6
7
8
9
/**
 * Generates a number sequence from 1 to `length`.
 *
 * @param length The length of the sequence.
 * @returns The sequence.
 */
export function times(length: number): number[] {
  return Array.from({ length }, (_, i) => i + 1);
}