[RECIPE]: Callstack in Javascript

[RECIPE]: Callstack in Javascript

When debugging legacy javascript code you might need to know who called this function. The simple solution for it - using Error Object, which has stack information.

console.log(new Error('Stack Trace').stack)