1
0

index.js 363 B

12345678910111213
  1. 'use strict';
  2. const callsites = () => {
  3. const _prepareStackTrace = Error.prepareStackTrace;
  4. Error.prepareStackTrace = (_, stack) => stack;
  5. const stack = new Error().stack.slice(1);
  6. Error.prepareStackTrace = _prepareStackTrace;
  7. return stack;
  8. };
  9. module.exports = callsites;
  10. // TODO: Remove this for the next major release
  11. module.exports.default = callsites;