8 lines
440 B
TypeScript
8 lines
440 B
TypeScript
// PinMAME identifies a ROM by its short "game name" (e.g. "hvymetal"), not
|
|||
|
|
// the table's display title — see loadRom() in @valknar/vpinball-wasm. ROM
|
||
|
|
// zips are conventionally distributed named after that game name, so it's
|
||
|
|
// derived from the uploaded zip's filename rather than asked for separately.
|
||
|
|
export function romGameNameFromFileName(fileName: string): string {
|
||
|
|
return fileName.replace(/\.zip$/i, "").trim().toLowerCase();
|
||
|
|
}
|