mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-19 15:54:09 +02:00
Format numbers to look nice, update info that is displayed on Character page
This commit is contained in:
@@ -63,4 +63,12 @@ function isString(str) {
|
||||
//Returns whether an array contains entirely of string objects
|
||||
function containsAllStrings(arr) {
|
||||
return arr.every(isString);
|
||||
}
|
||||
|
||||
//Formats a number with commas and a specific number of decimal digits
|
||||
function formatNumber(num, numFractionDigits) {
|
||||
return num.toLocaleString(undefined, {
|
||||
minimumFractionDigits: numFractionDigits,
|
||||
maximumFractionDigits: numFractionDigits
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user