aboutsummaryrefslogtreecommitdiff
path: root/test/support/times.ts
blob: b611d71353e84da4fc4e0a9bd3ea830cc9200dbd (plain)
1
2
3
4
5
6
7
8
9
10
/**
 * 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);
}