UNPKG

koa-body

Version:

A Koa body parser middleware. Supports multipart, urlencoded and JSON request bodies.

10 lines 303 B
export default function throwableToError(e) { if (e instanceof Error) { return e; } const error = new Error(typeof e === 'object' ? JSON.stringify(e) : `${e}`); error.name = typeof e; error.stack = undefined; return error; } //# sourceMappingURL=throwable-to-error.js.map