Bläddra i källkod

refactor 7

removed a typo in code and shifted defaultDescibeSimple to be next to defualtDescribe
master
jsb5468 5 år sedan
förälder
incheckning
dfe824be50
1 ändrade filer med 11 tillägg och 10 borttagningar
  1. +11
    -10
      recursive-macro.js

+ 11
- 10
recursive-macro.js Visa fil

@@ -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() {
this.sum = defaultSum;
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){
if (verbose) {
if (parent.count <= 3) {
@@ -1343,7 +1344,7 @@ function Micro(count = 1) {
this.count = count;
this.contents = initContents(this.name,this.count);

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


Laddar…
Avbryt
Spara