summaryrefslogtreecommitdiff
path: root/deps/node-inspect/examples/backtrace.js
blob: f18b33ea5584b296f34f7e3545ba3630f234eafd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const { exports: moduleScoped } = module;

function topFn(a, b = false) {
  const l1 = a;
  let t = typeof l1;
  var v = t.length;
  debugger;
  return b || t || v || moduleScoped;
}

class Ctor {
  constructor(options) {
    this.options = options;
  }

  m() {
    const mLocal = this.options;
    topFn(this);
    return mLocal;
  }
}

(function () {
  const theOptions = { x: 42 };
  const arr = [theOptions];
  arr.forEach(options => {
    const obj = new Ctor(options);
    return obj.m();
  });
}());