In live-server.js I noticed that you're using String#indexOf to see if an item exists in an array as opposed to the more appropriate String#includes. I doubt there's enough of a performance difference to truly matter but it's much more readable.
It also is slightly less characters overall to use .includes() than .indexOf() > -1
For example:
/* OLD */
if (arg.indexOf("--port=") > -1) {
}
/* NEW */
if (arg.includes("--port=")) {
}
In
live-server.js
I noticed that you're usingString#indexOf
to see if an item exists in an array as opposed to the more appropriateString#includes
. I doubt there's enough of a performance difference to truly matter but it's much more readable.It also is slightly less characters overall to use
.includes()
than.indexOf() > -1
For example: