@amandaghassaei/vector-math
Version:
A minimal vector math library to handle 2D/3D translations and rotations, written in TypeScript.
12 lines (11 loc) • 406 B
text/typescript
export function getStackTraceAsString(): string {
try {
throw new Error('');
} catch (error: any) {
/* c8 ignore next 1 */
const stackString: string = error.stack || '';
const stack = stackString.split('\n').map((line) => line.trim());
stack.splice(0, 2); // Remove first two elements (just points to this function).
return stack.join('\n');
}
}