mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-27 02:41:53 +00:00
Run prettier across sdk/base and sdk/package to apply the standardized quote style (single quotes matching web).
10 lines
213 B
TypeScript
10 lines
213 B
TypeScript
export const asError = (e: unknown) => {
|
|
if (e instanceof Error) {
|
|
return new Error(e as any)
|
|
}
|
|
if (typeof e === 'string') {
|
|
return new Error(`${e}`)
|
|
}
|
|
return new Error(`${JSON.stringify(e)}`)
|
|
}
|