
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
error-position
Advanced tools
根据 js 错误堆栈字符串和 sourceMap 文件定位错误位置
例如:代码中抛出这样的错误:
try {
throw new EvalError('Hello');
} catch (e) {
console.log(e.stack);
}
输入:错误堆栈 e.stack 字符串,sourcemap文件路径E:\\code\\dist
输出:错误在源代码中所在位置、行数、列数、报错行代码等信息
安装:npm install --save error-position
const errorPosition = require("error-position");
let result = errorPosition(`EvalError: Hello
at Object.<anonymous> (/Users/file/errorPosition/index.js:4:9)
at Module._compile (internal/modules/cjs/loader.js:1155:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
`,
'E:\\code\\dist')
FAQs
根据js常见错误堆栈字符串和sourceMap文件路径定位错误位置
The npm package error-position receives a total of 16 weekly downloads. As such, error-position popularity was classified as not popular.
We found that error-position demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.