aboutsummaryrefslogtreecommitdiff
path: root/src/extensions/Extensions_String.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-05-19 01:01:02 -0400
committerbobzel <zzzman@gmail.com>2024-05-19 01:01:02 -0400
commit6e72f969029c22fe797397a6437836a0482260b6 (patch)
treee8ccde75702e557b2226c9069263e1bc3bd21a4b /src/extensions/Extensions_String.ts
parent5ff0bef5d3c4825aa7210a26c98aae3b24f4a835 (diff)
parent13dc6de0e0099f699ad0d2bb54401e6a0aa25018 (diff)
Merge branch 'restoringEslint' into alyssa-starter
Diffstat (limited to 'src/extensions/Extensions_String.ts')
-rw-r--r--src/extensions/Extensions_String.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/extensions/Extensions_String.ts b/src/extensions/Extensions_String.ts
new file mode 100644
index 000000000..c95095f8e
--- /dev/null
+++ b/src/extensions/Extensions_String.ts
@@ -0,0 +1,16 @@
+/* eslint-disable no-extend-native */
+function Assign() {
+ String.prototype.removeTrailingNewlines = function () {
+ let sliced = this;
+ while (sliced.endsWith('\n')) {
+ sliced = sliced.substring(0, this.length - 1);
+ }
+ return sliced as string;
+ };
+
+ String.prototype.hasNewline = function () {
+ return this.endsWith('\n');
+ };
+}
+
+export { Assign };