From dfe824be508d948e15634a7dd941de00eccd97e8 Mon Sep 17 00:00:00 2001 From: jsb5468 Date: Thu, 26 Dec 2019 23:47:02 -0500 Subject: [PATCH] refactor 7 removed a typo in code and shifted defaultDescibeSimple to be next to defualtDescribe --- recursive-macro.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/recursive-macro.js b/recursive-macro.js index bf69a45..5da543c 100644 --- a/recursive-macro.js +++ b/recursive-macro.js @@ -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); } }