mirror of
https://github.com/MrLowPr/overdrive.git
synced 2026-10-23 11:01:28 +02:00
13 lines
380 B
JavaScript
13 lines
380 B
JavaScript
// ../pub-game-store/native/search/edit.js
|
|
// reconstructed from the esbuild bundle in eboot.bin
|
|
|
|
|
|
function edit(query, value, maximum = 40) {
|
|
if (value === "delete") return query.slice(0, -1);
|
|
if (value === "clear") return "";
|
|
if (query.length >= maximum || value === " " && !query) return query;
|
|
return (query + value).slice(0, maximum);
|
|
}
|
|
|
|
export { edit };
|