aboutsummaryrefslogtreecommitdiff
path: root/comb.js
diff options
context:
space:
mode:
Diffstat (limited to 'comb.js')
-rw-r--r--comb.js12
1 files changed, 12 insertions, 0 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;
+}