2017-12-15 18:56:14 +00:00
|
|
|
'use strict';
|
2021-05-08 12:39:21 +00:00
|
|
|
|
|
|
|
const callsites = () => {
|
|
|
|
const _prepareStackTrace = Error.prepareStackTrace;
|
|
|
|
Error.prepareStackTrace = (_, stack) => stack;
|
|
|
|
const stack = new Error().stack.slice(1);
|
|
|
|
Error.prepareStackTrace = _prepareStackTrace;
|
2017-12-15 18:56:14 +00:00
|
|
|
return stack;
|
|
|
|
};
|
2021-05-08 12:39:21 +00:00
|
|
|
|
|
|
|
module.exports = callsites;
|
|
|
|
// TODO: Remove this for the next major release
|
|
|
|
module.exports.default = callsites;
|