Skill update round trip / roundtrip (false, macos-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, macos-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, symlink, latest) (push) Canceled after 0s
Skill update round trip / roundtrip (false, windows-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, windows-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, macos-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, macos-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, ubuntu-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, ubuntu-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, windows-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, windows-latest, symlink, 1.5.17) (push) Canceled after 0s
13 lines
516 B
JavaScript
13 lines
516 B
JavaScript
export function buildCounterbalancedSchedule(pairCount, firstArm, secondArm) {
|
|
if (!Number.isInteger(pairCount) || pairCount <= 0 || pairCount % 2 !== 0) {
|
|
throw new Error('Counterbalanced schedules require a positive even pair count')
|
|
}
|
|
if (!firstArm || !secondArm || firstArm === secondArm) {
|
|
throw new Error('Counterbalanced schedules require two distinct arms')
|
|
}
|
|
|
|
return Array.from({ length: pairCount }, (_, index) =>
|
|
index % 2 === 0 ? [firstArm, secondArm] : [secondArm, firstArm]
|
|
)
|
|
}
|