You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
363 B

4 years ago
  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;