aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <holden.rohrer@gmail.com>2019-12-19 07:49:42 -0500
committerHolden Rohrer <holden.rohrer@gmail.com>2019-12-19 07:49:42 -0500
commit896cda1302d3fb687726a662d029d6f2a557a34a (patch)
tree88dea3af47d7a20ebf5c639bac4e9ab342924937
parent24e14950fed8f7396253637fb6657c6d6072efa7 (diff)
parente493e676761ba2fde81128fb0180c84b3529921b (diff)
Merged utils into jarvis for comb.js
-rw-r--r--comb.js12
-rw-r--r--space.js1
2 files changed, 12 insertions, 1 deletions
diff --git a/comb.js b/comb.js
new file mode 100644
index 0000000..f607790
--- /dev/null
+++ b/comb.js
@@ -0,0 +1,12 @@
+// A set of combine utilities for use with Space.comb()
+// Note: char1 is this and char2 is other. char1 will go "over" char2
+
+function add(char1, char2){
+ if (char1 == '') return char2;
+ else return char1;
+}
+
+function sub(char1, char2){
+ if (char1 == char2) return '';
+ else return char1;
+}
diff --git a/space.js b/space.js
index e562925..619b47b 100644
--- a/space.js
+++ b/space.js
@@ -123,5 +123,4 @@ function Space(){ // CLASS
}
}
-
module.exports = Space