reduce mandatory requirements

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-02-18 17:53:08 +01:00
parent d6bbfe3dc2
commit 6fdd3a53cf
55 changed files with 120 additions and 103 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
String.prototype.format = function (args) { // eslint-disable-line no-extend-native, func-names
let thisString = '';
for (let charPos = 0; charPos < this.length; charPos++) thisString += this[charPos];
for (const key in args) { // eslint-disable-line guard-for-in
for (const key in args) {
const stringKey = `{${key}}`;
thisString = thisString.replace(new RegExp(stringKey, 'g'), args[key]);
}