@mozaic-fi/intent-swapper-sdk-common
Version:
Intent Swapper Common SDK
18 lines • 572 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getErrorStackCallerPaths = getErrorStackCallerPaths;
function getErrorStackCallerPaths() {
const filePaths = [];
const stack = new Error().stack;
if (stack) {
const stackLines = stack.split('\n');
for (const stackLine of stackLines) {
const matches = stackLine.match(/^[^\/]+([^\:]+)\:/);
if (matches) {
filePaths.push(matches[1]);
}
}
}
return filePaths;
}
//# sourceMappingURL=error.js.map