« get me outta code hell

art credits & listings + more stuff - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/upd8-util.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-11-14 12:09:21 -0400
committerFlorrie <towerofnix@gmail.com>2019-11-14 12:10:10 -0400
commit7e2ea7b8be7607cc56ffd8a57250e8412a525ce4 (patch)
treee70a831f92ade5d9821a4e48d8280cd805422b14 /upd8-util.js
parent85495500e80b84e562a3239d13a110f408989917 (diff)
art credits & listings + more stuff
Diffstat (limited to 'upd8-util.js')
-rw-r--r--upd8-util.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/upd8-util.js b/upd8-util.js
index fb2acb6..b36fbc9 100644
--- a/upd8-util.js
+++ b/upd8-util.js
@@ -27,7 +27,7 @@ module.exports.splitArray = function*(array, fn) {
 };
 
 // This function's name is a joke. Jokes! Hahahahahahahaha. Funny.
-module.exports.joinNoOxford = function(array) {
+module.exports.joinNoOxford = function(array, plural = 'and') {
     if (array.length === 0) {
         // ????????
         return '';
@@ -38,8 +38,8 @@ module.exports.joinNoOxford = function(array) {
     }
 
     if (array.length === 2) {
-        return `${array[0]} and ${array[1]}`;
+        return `${array[0]} ${plural} ${array[1]}`;
     }
 
-    return `${array.slice(0, -1).join(', ')} and ${array[array.length - 1]}`;
+    return `${array.slice(0, -1).join(', ')} ${plural} ${array[array.length - 1]}`;
 };