
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.
mares-error-mapper
Advanced tools
슬로그업 mares프레임워크에서 사용하는 매핑 모듈입니다. 마레스 에러 객체에 복합유니크 키로 인하여 배열의 여러 에러가 있을 경우 필요한 에러만 추출해 줍니다. 또한 코드를 매핑하여 메시지를 만듭니다.
npm install --save mares-error-mapper
const mapper = require('mares-error-mapper')
// param에 appKey를 갖고 있는 에러를 지워주는 미들웨어를 반환합니다.
const middle = mapper.uniqueMapper(['appKey'])
const mapper = require('mares-error-mapper')
// 번역파일을 이용하여 코드를 메시지로 번역하는미들웨어를 반환합니다.
let codeLang = {
"codes": {
"invalidKey": "wrokng key value",
"prohibitNull": "null is prohibit"
}
}
const middle = mapper.codeTranslator(codeLang)
const mapper = require('mares-error-mapper')
//또한 제이슨 자체로도 사용 가능합니다.
let codeLang = {
"codes": {
"invalidKey": "wrokng key value",
"prohibitNull": "null is prohibit"
}
}
let codeLangJson = JSON.stringify(codeLang)
const middle = mapper.codeTranslatorByJson(codeLangJson)
const mapper = require('mares-error-mapper')
// 번역파일을 이용하여 코드를 메시지로 번역하는 함수입니다.
let codeLang = {
"codes": {
"invalidKey": "wrokng key value",
"prohibitNull": "null is prohibit"
}
}
let rows = [{
code:'invalidKey'
},{
code:'prohibitNull'
}]
let newRows = mapper.translateCode(rows, codeLang)
const mapper = require('mares-error-mapper')
//또한 제이슨 자체로도 사용 가능합니다.
let codeLang = {
"codes": {
"invalidKey": "wrokng key value",
"prohibitNull": "null is prohibit"
}
}
let rows = [{
code:'invalidKey'
},{
code:'prohibitNull'
}]
let codeLangJson = JSON.stringify(codeLang)
let newRows = mapper.translateCodeByJson(rows, codeLangJson)
FAQs
마레스 에러를 번역 및 매핑하는 모듈입니다.
We found that mares-error-mapper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers 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.