routie dev init since i didn't adhere to any proper guidance up until now

This commit is contained in:
2026-04-29 22:27:29 -06:00
commit e1dabb71e2
15301 changed files with 3562618 additions and 0 deletions
@@ -0,0 +1,24 @@
import { computeGroupsNames } from './compute-groups-names.js'
/**
* Throws an error if a group is specified more than once.
*
* @param parameters - Parameters object.
* @param parameters.groups - The groups to check for duplicates.
* @throws Error Will throw an error if duplicated groups are found.
*/
function validateNoDuplicatedGroups({ groups }) {
let groupNames = computeGroupsNames(groups)
let seenGroups = /* @__PURE__ */ new Set()
let duplicatedGroups = /* @__PURE__ */ new Set()
for (let groupName of groupNames) {
if (seenGroups.has(groupName)) {
duplicatedGroups.add(groupName)
} else {
seenGroups.add(groupName)
}
}
if (duplicatedGroups.size > 0) {
throw new Error(`Duplicated group(s): ${[...duplicatedGroups].join(', ')}`)
}
}
export { validateNoDuplicatedGroups }