MCPcopy Create free account
hub / github.com/027xiguapi/code-box / leftPad

Method leftPad

utils/totp.ts:90–92  ·  view source on GitHub ↗

* Left pad a string with zeros * @param str String to pad * @param len Desired length * @returns Padded string

(str: string, len: number)

Source from the content-addressed store, hash-verified

88 * @returns Padded string
89 */
90 private static leftPad(str: string, len: number): string {
91 return str.padStart(len, "0")
92 }
93
94 /**
95 * Verify if the input code is valid for the given secret

Callers 2

generateTOTPAtCounterMethod · 0.95
base32ToHexMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected