
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
node控制台颜色打印
npm i ncol
例子
const ncol = require("ncol");
ncol
.log("-----------------")
.log("我是每行只有一种颜色")
.bold("0;1")
.italic("0;3")
.underline("0;4")
.inverse("0;7")
.strikethrough("0;9")
.white("39;37")
.grey("39;90")
.black("39;0")
.blue("39;34")
.cyan("39;36")
.green("39;32")
.magenta("39;35")
.red("39;31")
.yellow("39;33")
.whiteBG("49;47")
.greyBG("49;5")
.blackBG("49;40")
.blueBG("49;44")
.cyanBG("49;46")
.greenBG("49;42")
.magentaBG("49;45")
.redBG("49;41")
.yellowBG("49;43")
.log("-----------------")
.log("我是单行多颜色")
.color(function () {
this
.log("log")
.error("error")
.errorBG("errorBG")
.info("info")
.infoBG("infoBG")
.success("success")
.successBG("successBG")
.warn("warn")
.warnBG("warnBG")
})
.log("-----------------")
.log("我也是每行只有一种颜色")
.error("error")
.errorBG("errorBG")
.info("info")
.infoBG("infoBG")
.success("success")
.successBG("successBG")
.warn("warn")
.warnBG("warnBG")
.log("-----------------")
//扩展新颜色,注册两个新颜色
.extendColor({
newcolor:"2;100",
newcolor2:"90;46",
})
.newcolor("我是newcolor,一个新定义的颜色")
.newcolor2("我是newcolor2,一个新定义的颜色")
.log("-----------------");
效果如下 说明(各平台可能有所不同,仅供参考。本效果是Windows平台)
FAQs
node控制台颜色打印
We found that ncol 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.