This commit is contained in:
Jonasz Bigda
2023-03-25 21:51:42 +01:00
parent 0db1d5117e
commit b332e9ceb0
1044 changed files with 37502 additions and 63938 deletions

10
node_modules/bytes/index.js generated vendored
View File

@@ -117,7 +117,11 @@ function format(value, options) {
}
if (thousandsSeparator) {
str = str.replace(formatThousandsRegExp, thousandsSeparator);
str = str.split('.').map(function (s, i) {
return i === 0
? s.replace(formatThousandsRegExp, thousandsSeparator)
: s
}).join('.');
}
return str + unitSeparator + unit;
@@ -158,5 +162,9 @@ function parse(val) {
unit = results[4].toLowerCase();
}
if (isNaN(floatValue)) {
return null;
}
return Math.floor(map[unit] * floatValue);
}