99AI/dist/common/utils/maskIpAddress.js
2024-01-17 09:22:28 +08:00

12 lines
321 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.maskIpAddress = void 0;
function maskIpAddress(ipAddress) {
if (!ipAddress)
return '';
const ipArray = ipAddress.split('.');
ipArray[2] = '***';
return ipArray.join('.');
}
exports.maskIpAddress = maskIpAddress;