diff options
author | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-18 09:36:18 -0500 |
---|---|---|
committer | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-18 09:36:18 -0500 |
commit | e493e676761ba2fde81128fb0180c84b3529921b (patch) | |
tree | b3afc1f3783cb0556e5532086adff78968d72274 | |
parent | 78a5f75d9501774e6a8b12c357afbe8404b10f36 (diff) |
added comb.js
-rw-r--r-- | comb.js | 12 | ||||
-rw-r--r-- | space.js | 5 |
2 files changed, 15 insertions, 2 deletions
@@ -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; +} @@ -104,5 +104,6 @@ function Space(){ // CLASS } } - -exports.Space = Space +const comb = require('comb'); // A small set of utilities for Space.comb +exports.Space = Space; +exports.comb = comb; |