UNPKG

koa-body

Version:

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

13 lines 401 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = throwableToError; 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