🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

error-position

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

error-position - npm Package Compare versions

Comparing version
1.0.3
to
1.0.4
+10
tsconfig.json
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"declaration": true,
"sourceMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
}
}
+2
-108

@@ -1,113 +0,7 @@

// Type definitions for index.js
// Project: [LIBRARY_URL_HERE]
// Definitions by: [YOUR_NAME_HERE] <[YOUR_URL_HERE]>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// parseError.!ret
/**
* 解析错误堆栈字符串
*/
declare interface Ret {
/**
*
*/
message : string;
/**
*
*/
stack : Array</* getSourceCode.!1 */ any>;
}
// getSourceCode.!1
/**
*
*/
declare interface 1 {
/**
*
*/
code : string;
/**
*
*/
url : string;
/**
*
*/
line : number;
/**
*
*/
col : number;
}
// getSourceCode.!ret
/**
*
*/
declare interface Ret {
/**
*
*/
ret : boolean;
/**
*
*/
stack : /* getSourceCode.!1 */ any;
}
/**
* 输入err:错误堆栈字符串
* 输入:sourceMap文件路径
* 输出sourceMap:错误位置代码相关信息
* @param err
* @param sourceMap
* @return
*/
declare function errorPosition(err : any, sourceMap : any): Promise;
/**
* 解析错误堆栈字符串
* @param err 错误堆栈字符串
* @param err
* @return
*/
declare function parseError(err : any): Ret;
/**
* 获取souceMap的consumer
* @param {*} sourceMapPath souceMap文件所在文件夹路径
* @param {*} filename sourceMap文件名
* @param sourceMapPath
* @param filename
* @return
*/
declare function getSourceMapConsumer(sourceMapPath : any, filename : boolean | string): Promise;
/**
* 处理souceMpa文件
* @param {*} sourceMapPath souceMap文件所在文件夹路径
* @param {*} errStack 错误堆栈
* @param sourceMapPath
* @param errStack
* @return
*/
declare function sourceMapDeal(sourceMapPath : any, errStack : /* parseError.!ret */ any): Promise;
/**
* 获取源码所在位置、所在行代码等信息
* @param {*} consumer souceMap文件的consumer
* @param {*} stack 错误堆栈解析后的信息
* @param consumer
* @param stack
* @return
*/
declare function getSourceCode(consumer : string, stack : 1): Ret;
declare function errorPosition(err: any, sourceMap: any): Promise<any[]>;
export default errorPosition;
{
"name": "error-position",
"version": "1.0.3",
"version": "1.0.4",
"author": "jingjing",

@@ -5,0 +5,0 @@ "description": "根据js常见错误堆栈字符串和sourceMap文件路径定位错误位置",