blob: 1cde7215a88afeb151b4c818a3586d47c60ba9c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Tests space.comb()
const Space = require('../space');
newspace = new Space();
newspace.adhoc('\
line1\n\
&&&&transparency&&&&\n\
\n\
afterempty\n')
otherspace = new Space();
otherspace.adhoc('\
&&&transparency&&&\n\
testline');
function add(char1,char2){
if (char1 == '') return char2;
else return char1;
}
otherspace.comb(newspace, add, [0,0]);
console.log(otherspace.print());
|