File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ import type { CResult } from '../types.mts'
1212
1313const TOKEN_PREFIX = 'sktsec_'
1414
15- const { length : TOKEN_PREFIX_LENGTH } = TOKEN_PREFIX
15+ const TOKEN_PREFIX_LENGTH = TOKEN_PREFIX . length
16+
17+ const TOKEN_VISIBLE_LENGTH = 5
1618
1719// The Socket API server that should be used for operations.
1820function getDefaultApiBaseUrl ( ) : string | undefined {
@@ -61,7 +63,10 @@ export function getDefaultToken(): string | undefined {
6163export function getVisibleTokenPrefix ( ) : string {
6264 const apiToken = getDefaultToken ( )
6365 return apiToken
64- ? apiToken . slice ( TOKEN_PREFIX_LENGTH , TOKEN_PREFIX_LENGTH + 5 )
66+ ? apiToken . slice (
67+ TOKEN_PREFIX_LENGTH ,
68+ TOKEN_PREFIX_LENGTH + TOKEN_VISIBLE_LENGTH ,
69+ )
6570 : ''
6671}
6772
You can’t perform that action at this time.
0 commit comments