dantil.js
function getStackTraceArray() {
  var origStackTraceLimit = Error.stackTraceLimit
  var origPrepareStackTrace = Error.prepareStackTrace

  // Collect all stack frames.
  Error.stackTraceLimit = Infinity

  // Get a structured stack trace as an `Array` of `CallSite` objects, each of which represents a stack frame, with frames for native Node functions and this file removed.
  Error.prepareStackTrace = function (error, structuredStackTrace) {
    return structuredStackTrace.filter(function (frame) {
      var filePath = frame.getFileName()

      // Skip frames from within this module (i.e., `dantil`).
      if (filePath === __filename) {
        return false
      }

      // Skip frames for native Node functions (e.g., `require()`).
      if (!/\//.test(filePath)) {
        return false
      }

      return true
    })
  }

  // Collect the stack trace.
  var stack = Error().stack

  // Restore stack trace configuration after collecting stack trace.
  Error.stackTraceLimit = origStackTraceLimit
  Error.prepareStackTrace = origPrepareStackTrace

  return stack
}
function getStackTraceArray() {
  var origStackTraceLimit = Error.stackTraceLimit
  var origPrepareStackTrace = Error.prepareStackTrace

  // Collect all stack frames.
  Error.stackTraceLimit = Infinity

  // Get a structured stack trace as an `Array` of `CallSite` objects, each of which represents a stack frame, with frames for native Node functions and this file removed.
  Error.prepareStackTrace = function (error, structuredStackTrace) {
    return structuredStackTrace.filter(function (frame) {
      var filePath = frame.getFileName()

      // Skip frames from within this module (i.e., `dantil`).
      if (filePath === __filename) {
        return false
      }

      // Skip frames for native Node functions (e.g., `require()`).
      if (!/\//.test(filePath)) {
        return false
      }

      return true
    })
  }

  // Collect the stack trace.
  var stack = Error().stack

  // Restore stack trace configuration after collecting stack trace.
  Error.stackTraceLimit = origStackTraceLimit
  Error.prepareStackTrace = origPrepareStackTrace

  return stack
}
function getStackTraceArray ( ) { var origStackTraceLimit = Error . stackTraceLimit var origPrepareStackTrace = Error . prepareStackTrace // Collect all stack frames. Error . stackTraceLimit = Infinity // Get a structured stack trace as an `Array` of `CallSite` objects, each of which represents a stack frame, with frames for native Node functions and this file removed. Error . prepareStackTrace = function ( error , structuredStackTrace ) { return structuredStackTrace . filter ( function ( frame ) { var filePath = frame . getFileName ( ) // Skip frames from within this module (i.e., `dantil`). if ( filePath === __filename ) { return false } // Skip frames for native Node functions (e.g., `require()`). if ( ! / \/ / . test ( filePath ) ) { return false } return true } ) } // Collect the stack trace. var stack = Error ( ) . stack // Restore stack trace configuration after collecting stack trace. Error . stackTraceLimit = origStackTraceLimit Error . prepareStackTrace = origPrepareStackTrace return stack }
Gets the structured stack trace as an array of `CallSite` objects, excluding the stack frames for this module and native Node functions.

@private
@static
@returns {CallSite[]} Returns the structured stack trace.
Gets the structured stack trace as an array of CallSite objects excluding the stack frames for this module and native Node functions .