Browse Source

refactor 7

removed a typo in code and shifted defaultDescibeSimple to be next to defualtDescribe
master
jsb5468 5 years ago
parent
commit
dfe824be50
1 changed files with 11 additions and 10 deletions
  1. +11
    -10
      recursive-macro.js

+ 11
- 10
recursive-macro.js View File

@@ -726,15 +726,6 @@ function defaultAddContent(thing) {
}; };
} }


function defaultDescribeSimple(thing) {
return function(flat) {
if (flat) {
return flatten(thing).describe(false)
} else {
return thing.describe(false);
}
}
}
function DefaultEntity() { function DefaultEntity() {
this.sum = defaultSum; this.sum = defaultSum;
this.area = defaultArea; this.area = defaultArea;
@@ -757,6 +748,16 @@ function copy_defaults(self,proto) { //loads the values defined in things into t
} }
} }


function defaultDescribeSimple(thing) {
return function(flat) {
if (flat) {
return flatten(thing).describe(false)
} else {
return thing.describe(false);
}
}
}

function defaultDescribe(verbose=true, parent){ function defaultDescribe(verbose=true, parent){
if (verbose) { if (verbose) {
if (parent.count <= 3) { if (parent.count <= 3) {
@@ -1343,7 +1344,7 @@ function Micro(count = 1) {
this.count = count; this.count = count;
this.contents = initContents(this.name,this.count); this.contents = initContents(this.name,this.count);


tthis.describe = function(verbose=true) {
this.describe = function(verbose=true) {
return defaultDescribe(verbose, this); return defaultDescribe(verbose, this);
} }
} }


Loading…
Cancel
Save