UNPKG

raygun

Version:

Raygun package for Node.js, written in TypeScript

16 lines (15 loc) 645 B
/** * Humanize error objects with the following conditions: * - Keeps the output to a single line * - Maximum one level deep * * Example: * - Object `{ name: "Test" }` becomes string `name=Test` as all is the top level * - Object `{ one: { name: "Test" }}` becomes string `one={name=Test}` as one level deep is explored * - Object `{ one: { two: { name: "Test" }}}` becomes string `one={two=...}` as the max level deep is reached * * @param obj - input object to stringify * @param level - level of recursion, should start at 0 * @returns a formatted String */ export declare function humanString(obj: any, level?: number): string;