export const getStack = ({ skip = 0 }: { skip?: number } = {}) =>
  new Error().stack
    ?.split('\n')
    .slice(2 + skip)
    .map((line) => {
      const match = line.match(/at\s+([^\s(]+)/);
      return match ? match[1] : '';
    })
    .filter((name) => name && name !== 'Promise')
    .join('@') || '';
