UNPKG

test-each

Version:

🤖 Repeat tests. Repeat tests. Repeat tests.

13 lines (8 loc) • 236 B
export const addRepeat=(input)=>{ if(!isRepeat(input)){ return input } return Array.from({length:input},getRepeatIndex) }; export const isRepeat=(input)=>Number.isInteger(input)&&input>=0; const getRepeatIndex=(value,index)=>index;