UNPKG

exception-formatter

Version:

[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) [![Build Status](https://travis-ci.org/benbria/exception-formatter.svg?branch=master)](ht

19 lines (15 loc) 611 B
export = exceptionFormatter; interface ExceptionFormatterOptionsCommon { maxLines?: number | null | 'auto'; basepath?: string; basepathReplacement?: string; } type ExceptionFormatterOptions = | ExceptionFormatterOptionsCommon | ({ format: 'ascii' } & ExceptionFormatterOptionsCommon) | ({ format: 'ansi'; colors?: boolean } & ExceptionFormatterOptionsCommon) | ({ format: 'html'; inlineStyle?: boolean } & ExceptionFormatterOptionsCommon); declare function exceptionFormatter( exception: Error | { stack: string } | string, options?: ExceptionFormatterOptions, ): string;