
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@gotoeasy/err
Advanced tools
@gotoeasy/err一个用于node环境的Error子类,提供更丰富的构造参数接口,更友好的code-frame提示,消息拼接等功能,详见Sample截图
npm i @gotoeasy/err
// z.js
const codeframe = require('@gotoeasy/err');
function runCompute(){
try{
let div = require('./test-divxxxxxxxxxxxxxxx');
return div(1, 0);
}catch(e){
throw Err.cat('my error message', e);
}
}
try{
runCompute();
}catch(e){
console.error(e.toString());
}
// test-div.js
module.exports = (a, b) => {
if ( b === 0 ) {
throw new Error('invalid parameter (b=0)')
}
return a/b;
};
// z.js
const codeframe = require('@gotoeasy/err');
function runCompute(){
try{
let div = require('./test-div');
return div(1, 0);
}catch(e){
throw Err.cat('my error message', e);
}
}
try{
runCompute();
}catch(e){
console.error(e.toString());
}
// z.js
const codeframe = require('@gotoeasy/err');
function runCompute(){
try{
return div(1, 0);
}catch(e){
throw new Err('my error message', e);
}
}
try{
runCompute();
}catch(e){
console.error(e.toString());
}
// z.js
const codeframe = require('@gotoeasy/err');
function runCompute(){
try{
return div(1, 0);
}catch(e){
throw Err.cat('my message 11111', 'file=z.js', e, new Err('err message'));
}
}
try{
runCompute();
}catch(e){
console.error(e.toString());
}
// z.js
const codeframe = require('@gotoeasy/err');
function runCompute(){
try{
return div.exec(1, 0);
}catch(e){
throw Err.cat('my error message', e);
}
}
try{
runCompute();
}catch(e){
console.error(e.toString());
}
// z.js
const codeframe = require('@gotoeasy/err');
function runCompute(){
try{
throw new Error('test');
}catch(e){
throw new Err('my message1', 'file=./test.js', e, {file:'./test.js', line:74, column:51});
}
}
try{
runCompute();
}catch(e){
console.error(e.toString());
}
Linksnpm-packages https://github.com/gotoeasy/npm-packagesFAQs
一个用于node环境的Error子类,提供更丰富的构造参数接口,更友好的code-frame提示,消息拼接等功能,详见Sample截图
The npm package @gotoeasy/err receives a total of 22 weekly downloads. As such, @gotoeasy/err popularity was classified as not popular.
We found that @gotoeasy/err 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.