mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-02 18:49:30 +08:00
16 lines
262 B
Text
16 lines
262 B
Text
import { sep } from 'path'
|
|
|
|
export function parseStack (stack) {
|
|
const cwd = process.cwd() + sep
|
|
|
|
const lines = stack
|
|
.split('\n')
|
|
.splice(1)
|
|
.map(l => l
|
|
.trim()
|
|
.replace('file://', '')
|
|
.replace(cwd, '')
|
|
)
|
|
|
|
return lines
|
|
}
|