1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge branch 'master' into fix_long_getItems_request_URL

This commit is contained in:
dann-merlin 2023-03-14 22:03:44 +00:00 committed by GitHub
commit 09a6ef2cdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
85 changed files with 358 additions and 320 deletions

View file

@ -2,6 +2,16 @@ function toLocaleStringSupportsOptions() {
return !!(typeof Intl === 'object' && Intl && typeof Intl.NumberFormat === 'function');
}
/**
* Generates a random integer in a given range.
* @param {number} min - Minimum of the range.
* @param {number} max - Maximum of the range.
* @returns {number} Randomly generated number.
*/
export function randomInt(min: number, max: number): number {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
/**
* Gets the value of a number formatted as a perentage.
* @param {number} value The value as a number.