Refactor Application.

This commit is contained in:
Oleg Sh
2023-12-02 18:11:09 +02:00
parent e81ca36385
commit fdbff31a13
8 changed files with 932 additions and 887 deletions

View File

@@ -47,4 +47,11 @@ function formatString(string, params) {
return string.replace(/{(\d+)}/g, (match, index) => {
return typeof params[index] !== 'undefined' ? params[index] : match;
});
}
}
Array.prototype.swap = function (x, y) {
var b = this[x];
this[x] = this[y];
this[y] = b;
return this;
}