fix player embed image not updating (maybe?)
This commit is contained in:
@ -7,7 +7,7 @@ import ScoreSaberPlayerScoresPageToken from "../../types/token/scoresaber/score-
|
||||
import ScoreSaberLeaderboardToken from "../../types/token/scoresaber/score-saber-leaderboard-token";
|
||||
import ScoreSaberLeaderboardScoresPageToken from "../../types/token/scoresaber/score-saber-leaderboard-scores-page-token";
|
||||
import { clamp, lerp } from "../../utils/math-utils";
|
||||
import { CurvePoint } from "../../utils/curve-point";
|
||||
import { CurvePoint } from "../../curve-point";
|
||||
import { SSRCache } from "../../cache";
|
||||
|
||||
const API_BASE = "https://scoresaber.com/api";
|
||||
|
14
projects/common/src/utils/string.util.ts
Normal file
14
projects/common/src/utils/string.util.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generates a random string
|
||||
*
|
||||
* @param length the length of the string
|
||||
* @returns the random string
|
||||
*/
|
||||
export function randomString(length: number) {
|
||||
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
let result = "";
|
||||
for (let i = 0; i < length; i++) {
|
||||
result += chars.charAt(Math.floor(Math.random() * chars.length));
|
||||
}
|
||||
return result;
|
||||
}
|
Reference in New Issue
Block a user