Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Mar 28, 2024
1 parent 80566e1 commit f7ce715
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,5 +361,10 @@ export function getCallerLocation(err = new Error()) {
}

export function getCallerLocationFromString(stackString = 'unknown') {
return stackString.split(/^\s*(at\s)?/m).filter(s => s?.includes(':'))[2]?.trim() || stackString
return (
stackString
.split(/^\s*(at\s)?/m)
.filter((s) => s?.includes(':'))[2]
?.trim() || stackString
)
}

0 comments on commit f7ce715

Please sign in to comment.