MCPcopy Index your code
hub / github.com/sqlchat/sqlchat / maskedKey

Function maskedKey

src/components/OpenAIApiConfigView.tsx:55–63  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

53 ];
54
55 const maskedKey = (str: string) => {
56 if (str.length < 7) {
57 return str;
58 }
59 const firstThree = str.slice(0, 3);
60 const lastFour = str.slice(-4);
61 const middle = ".".repeat(str.length - 7);
62 return `${firstThree}${middle}${lastFour}`;
63 };
64
65 useDebounce(
66 () => {

Callers 1

OpenAIApiConfigViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected