refactor: typo in songIDGenerator

This commit is contained in:
zkldi
2022-10-30 17:03:28 +00:00
parent 1f9f62fc7c
commit 4cfa407ac3
3 changed files with 5 additions and 5 deletions
@@ -4,7 +4,7 @@ const { Command } = require("commander");
const {
CreateChartID,
ReadCollection,
GetFreshScoreIDGenerator,
GetFreshSongIDGenerator: GetFreshScoreIDGenerator,
WriteCollection,
} = require("../../util");
@@ -5,7 +5,7 @@ const {
CreateChartID,
ReadCollection,
WriteCollection,
GetFreshScoreIDGenerator,
GetFreshSongIDGenerator,
} = require("../../util");
const program = new Command();
@@ -29,7 +29,7 @@ const folderIdToSongId = {};
let newSongs = 0;
let newCharts = 0;
const getFreshSongID = GetFreshScoreIDGenerator("usc");
const getFreshSongID = GetFreshSongIDGenerator("usc");
// if debug is true, console log. Else, do nothing.
const log = DEBUG ? console.log : () => undefined;
+2 -2
View File
@@ -80,7 +80,7 @@ function EfficientInPlaceDeepmerge(ref, apply) {
*
* Not thread safe.
*/
function GetFreshScoreIDGenerator(game) {
function GetFreshSongIDGenerator(game) {
let maxSongID = ReadCollection(`songs-${game}.json`).sort((a, b) => b.id - a.id)[0].id;
return () => ++maxSongID;
@@ -94,6 +94,6 @@ module.exports = {
ReadCollection,
WriteCollection,
EfficientInPlaceDeepmerge,
GetFreshScoreIDGenerator,
GetFreshSongIDGenerator,
CreateFolderIDFromFolder,
};