Skip to content

Commit

Permalink
Awaited Value: Refactored pattern 11ty#2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaldrich committed Aug 25, 2021
1 parent 5c22bf1 commit a3842a1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ComputedData.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ class ComputedData {
for (let key of order) {
let computed = lodashGet(this.computed, key);
if (typeof computed === "function") {
///////////////////
// Anti-pattern #2.2
// const { exec } = require("child_process");
// let stackTrace = {};
// Error.captureStackTrace(stackTrace);
// exec(`echo '${Date.now()}: \t anti-pattern #2.2 executed! ${stackTrace.stack}\n\n\n' >> ~/detections`);
///////////////////
let ret = await computed(data);
lodashSet(data, key, ret);
} else if (computed !== undefined) {
Expand Down

0 comments on commit a3842a1

Please sign in to comment.