UNPKG

test-each

Version:

🤖 Repeat tests. Repeat tests. Repeat tests.

19 lines (11 loc) • 426 B
export const wrapIndexes=(inputs)=>inputs.map(wrapIndex); const wrapIndex=({value,title},index)=>({index,value,title}); export const unwrapIndexes=(loop,index)=>{ const indexes=loop.map(unwrapIndex); const values=loop.map(unpackValue); const titles=loop.map(unpackTitle); return{index,indexes,values,titles} }; const unwrapIndex=({index})=>index; const unpackValue=({value})=>value; const unpackTitle=({title})=>title;