🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

error-stack-parser-es

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

error-stack-parser-es - npm Package Compare versions

Comparing version

to
0.1.3

dist/lite.cjs

23

dist/index.d.ts

@@ -0,16 +1,8 @@

import { ParseOptions, StackFrame } from './lite.js';
export { StackFrameLite, extractLocation } from './lite.js';
/**
* Port from https://github.com/stacktracejs/error-stack-parser-es
* Port from https://github.com/stacktracejs/error-stack-parser
*/
interface StackFrame {
args?: any[];
isConstructor?: boolean;
isEval?: boolean;
isNative?: boolean;
isToplevel?: boolean;
columnNumber?: number;
lineNumber?: number;
fileName?: string;
functionName?: string;
source?: string;
}
/**

@@ -22,4 +14,3 @@ * Given an Error object, extract the most information from it.

*/
declare function parse(error: Error): StackFrame[];
declare function extractLocation(urlLike: string): string[] | readonly [string, string | undefined, string | undefined];
declare function parse(error: Error, options?: ParseOptions): StackFrame[];
declare function parseV8OrIE(error: Error): StackFrame[];

@@ -32,2 +23,2 @@ declare function parseFFOrSafari(error: Error): StackFrame[];

export { type StackFrame, extractLocation, parse, parseFFOrSafari, parseOpera, parseOpera10, parseOpera11, parseOpera9, parseV8OrIE };
export { ParseOptions, StackFrame, parse, parseFFOrSafari, parseOpera, parseOpera10, parseOpera11, parseOpera9, parseV8OrIE };
{
"name": "error-stack-parser-es",
"type": "module",
"version": "0.1.2",
"version": "0.1.3",
"packageManager": "pnpm@9.1.1",

@@ -29,2 +29,7 @@ "description": "Cross-browser Error parser",

"require": "./dist/index.cjs"
},
"./lite": {
"types": "./dist/lite.d.ts",
"import": "./dist/lite.mjs",
"require": "./dist/lite.cjs"
}

@@ -31,0 +36,0 @@ },

@@ -17,2 +17,13 @@ # error-stack-parser-es

### Lite API
Additionally, this fork added a lite version of the API representation for the stack frames. You can import it from `error-stack-parser-es/lite`. For example, `line` and `col` instead of `lineNumber` and `columnNumber`.
```ts
import { parse } from 'error-stack-parser-es/lite'
const stacktrace = parse(new Error('BOOM!'))
// [{ file: 'file.js', name: 'method', line: 1, col: 2}]
```
## License

@@ -19,0 +30,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