MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / maskString

Function maskString

packages/db/src/services/event.service.ts:267–274  ·  view source on GitHub ↗
(str: string, mask = '*')

Source from the content-addressed store, hash-verified

265}
266
267function maskString(str: string, mask = '*') {
268 const allMasked = str.replace(/(\w)/g, mask);
269 if (str.length < 8) {
270 return allMasked;
271 }
272
273 return `${str.slice(0, 4)}${allMasked.slice(4)}`;
274}
275
276export function transformMinimalEvent(
277 event: IServiceEvent

Callers 1

transformMinimalEventFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected