Files
NapCatQQ/.pnpm-store/v3/files/a6/87ebe8a702a0024cd8fea94bcf7223931317c31bcbde03fa990e5a3e37db4c84818ce296bfcf3ac9d9c3b67bdbddb470bdf74791c736ebbcb4b5004caec873
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

28 lines
705 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
'use strict';
const colors = require('@colors/colors/safe');
const format = require('./format');
const { MESSAGE } = require('triple-beam');
/*
* function uncolorize (info)
* Returns a new instance of the uncolorize Format that strips colors
* from `info` objects. This was previously exposed as { stripColors: true }
* to transports in `winston < 3.0.0`.
*/
module.exports = format((info, opts) => {
if (opts.level !== false) {
info.level = colors.strip(info.level);
}
if (opts.message !== false) {
info.message = colors.strip(String(info.message));
}
if (opts.raw !== false && info[MESSAGE]) {
info[MESSAGE] = colors.strip(String(info[MESSAGE]));
}
return info;
});