Try supporting old versions of Node

This commit is contained in:
hiimgoodpack 2021-01-01 13:31:44 -05:00
parent 044787e284
commit ff61e90e8e
Signed by: hiimgoodpack
GPG key ID: 4E0E62733C14AE69
3 changed files with 6 additions and 2 deletions

View file

@ -7,6 +7,8 @@ You should use a terminal supporting [VT100 escape codes](https://www.climagic.o
If you have a modern terminal, they probably have it. If you have a modern terminal, they probably have it.
Your version of node should be >= 12.20.0
Any operating systems not using Linux are not supported. Any operating systems not using Linux are not supported.
# Installation # Installation
``` ```

View file

@ -17,6 +17,7 @@
*/ */
const brainlet = require("./brainlet-lib/index.js"); const brainlet = require("./brainlet-lib/index.js");
const replaceAll = require("replaceall");
const readline = require("readline").createInterface({ const readline = require("readline").createInterface({
input: process.stdin, input: process.stdin,
output: process.stdout output: process.stdout
@ -325,7 +326,7 @@ To leave this category, use '/quit'`);
break; break;
} }
socket.send(categoryID, message.replaceAll("/newline", "\n")); socket.send(categoryID, replaceAll("/newline", "\n", message));
} }
} }
} }

View file

@ -13,6 +13,7 @@
"author": "", "author": "",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"dependencies": { "dependencies": {
"readline": "^1.3.0" "readline": "^1.3.0",
"replaceall": "^0.1.6"
} }
} }