diff options
-rw-r--r-- | space.js | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -49,6 +49,7 @@ function Space(){ } } } + return this; } this.towrite = function(){ // Does no splitting or anything like that. Just returns a list of triplets for the write function @@ -70,6 +71,7 @@ function Space(){ this.fromfile = function(filename){ //Reads an external file into internal data this.adhoc(fs.readFileSync(filename,'utf8')); + return this; } this.adhoc = function(text){ @@ -82,6 +84,7 @@ function Space(){ } return row; }); + return this; } this.comb = function(other, func){ // other must have a valid .loc. If this.loc null, treated as offset @@ -112,6 +115,7 @@ function Space(){ this.data[row][chr] = func(this.data[row][chr], otherrow[chr-offset[1]] || ''); } } + return this; } this.search = function(other){ //Returns first instance of `other` subspace (prioritized vertically then horizontally) |