feat: fervidex ch-omni enable

This commit is contained in:
zkldi
2022-11-02 03:33:15 +00:00
parent ed1fea4962
commit e921d2bb7b
3 changed files with 15 additions and 8 deletions
+7 -5
View File
@@ -5,18 +5,20 @@ export function ParseEA3SoftID(ver: string) {
throw new Error(`Invalid Version Code. Had ${a.length} components.`);
}
const arr = a as [string, string, string, string, string];
if (!/^[A-Z0-9]{3}:[A-Z]:[A-Z]:[A-Z]:[0-9]{10}$/u.exec(ver)) {
throw new Error(`Invalid Version Code.`);
}
return {
model: a[0],
model: arr[0],
// region
dest: a[1],
dest: arr[1],
spec: a[2],
rev: a[3],
ext: a[4],
spec: arr[2],
rev: arr[3],
ext: arr[4],
};
}