This commit is contained in:
Maxim Devaev
2024-07-08 03:41:29 +03:00
parent e0bbf6968e
commit 630610bc53
50 changed files with 3835 additions and 77 deletions

View File

@@ -78,7 +78,7 @@ export var tools = new function() {
};
self.partial = function(func, ...args) {
return () => func(...args);
return (...rest) => func(...args, ...rest);
};
self.upperFirst = function(text) {
@@ -104,10 +104,6 @@ export var tools = new function() {
return Math.floor(Math.random() * (max - min + 1)) + min;
};
self.formatHex = function(value) {
return `0x${value.toString(16).toUpperCase()}`;
};
self.formatSize = function(size) {
if (size > 0) {
let index = Math.floor( Math.log(size) / Math.log(1024) );