error-stack-parser-es
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -39,5 +39,14 @@ interface StackFrame { | ||
declare function parse(error: Error, options?: ParseOptions): StackFrameLite[]; | ||
declare function extractLocation(urlLike: string): string[] | readonly [string, string | undefined, string | undefined]; | ||
/** | ||
* Parse stack string from V8, Firefox, or IE into an array of StackFrames. | ||
*/ | ||
declare function parseStack(stackString: string, options?: ParseOptions): StackFrameLite[]; | ||
/** | ||
* Separate line and column numbers from a string of the form: (URI:Line:Column) | ||
*/ | ||
declare function extractLocation(urlLike: string): [string, string | undefined, string | undefined]; | ||
declare function parseV8OrIE(error: Error, options?: ParseOptions): StackFrameLite[]; | ||
declare function parseV8OrIeString(stack: string, options?: ParseOptions): StackFrameLite[]; | ||
declare function parseFFOrSafari(error: Error, options?: ParseOptions): StackFrameLite[]; | ||
declare function parseFFOrSafariString(stack: string, options?: ParseOptions): StackFrameLite[]; | ||
declare function parseOpera(e: Error, options?: ParseOptions): StackFrameLite[]; | ||
@@ -48,2 +57,2 @@ declare function parseOpera9(e: Error, options?: ParseOptions): StackFrameLite[]; | ||
export { type ParseOptions, type StackFrame, type StackFrameLite, extractLocation, parse, parseFFOrSafari, parseOpera, parseOpera10, parseOpera11, parseOpera9, parseV8OrIE }; | ||
export { type ParseOptions, type StackFrame, type StackFrameLite, extractLocation, parse, parseFFOrSafari, parseFFOrSafariString, parseOpera, parseOpera10, parseOpera11, parseOpera9, parseStack, parseV8OrIE, parseV8OrIeString }; |
{ | ||
"name": "error-stack-parser-es", | ||
"type": "module", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"packageManager": "pnpm@9.1.1", | ||
@@ -6,0 +6,0 @@ "description": "Cross-browser Error parser", |
@@ -28,2 +28,11 @@ # error-stack-parser-es | ||
It also allows you to parse directly from a stacktrace string (which does not support Opera stacktrace format). | ||
```ts | ||
import { parseStack } from 'error-stack-parser-es/lite' | ||
const stacktrace = parseStack('Error\n at method (file.js:1:2)') | ||
// [{ file: 'file.js', name: 'method', line: 1, col: 2}] | ||
``` | ||
## License | ||
@@ -30,0 +39,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
28806
490
41
0