formatting code upload project instance to files

This commit is contained in:
IDONTSUDO 2023-11-28 18:34:41 +03:00
parent ce4c98ff13
commit a0b4f00f47
65 changed files with 399 additions and 748 deletions

View file

@ -11,4 +11,21 @@ export const StringExtensions = () => {
return this.length !== 0;
};
}
if ("".lastElement === undefined) {
String.prototype.lastElement = function () {
return this[this.length - 1];
};
}
if ("".fixToPath === undefined) {
// eslint-disable-next-line no-extend-native
String.prototype.fixToPath = function () {
// eslint-disable-next-line @typescript-eslint/no-this-alias
let result = this;
const symbolPath = "/";
if (this.lastElement != symbolPath) {
result = result.slice(0, -1);
}
return result;
};
}
};