mirror of
https://github.com/vastxie/99AI.git
synced 2025-11-12 19:53:42 +08:00
NineAI 2.4.2
This commit is contained in:
14
dist/common/utils/hideString.js
vendored
Normal file
14
dist/common/utils/hideString.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.hideString = void 0;
|
||||
function hideString(input, str) {
|
||||
const length = input.length;
|
||||
const start = input.slice(0, (length - 10) / 2);
|
||||
const end = input.slice((length + 10) / 2, length);
|
||||
const hidden = '*'.repeat(10);
|
||||
if (str) {
|
||||
return `**********${str}**********`;
|
||||
}
|
||||
return `${start}${hidden}${end}`;
|
||||
}
|
||||
exports.hideString = hideString;
|
||||
Reference in New Issue
Block a user