mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-26 17:07:58 +03:00
19 lines
472 B
JavaScript
19 lines
472 B
JavaScript
function FindChartWithPTDFVersion(collection, songID, playtype, difficulty, version) {
|
|
return collection.find(
|
|
(chart) =>
|
|
chart.songID === songID &&
|
|
chart.playtype === playtype &&
|
|
chart.difficulty === difficulty &&
|
|
chart.versions.includes(version)
|
|
);
|
|
}
|
|
|
|
function FindSongWithTitle(collection, title) {
|
|
return collection.find((e) => e.title === title || e.altTitles.includes(title));
|
|
}
|
|
|
|
module.exports = {
|
|
FindSongWithTitle,
|
|
FindChartWithPTDFVersion,
|
|
};
|