MCPcopy Create free account
hub / github.com/Web3Auth/Auth / isValidCode

Function isValidCode

src/jrpc/errors/utils.ts:33–35  ·  view source on GitHub ↗
(code: unknown)

Source from the content-addressed store, hash-verified

31 * @returns Whether the given code is valid.
32 */
33export function isValidCode(code: unknown): code is number {
34 return Number.isInteger(code);
35}
36
37export function isValidString(value: unknown): value is string {
38 return typeof value === "string" && value.length > 0;

Callers 2

isJsonRpcErrorFunction · 0.85
getMessageFromCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected