MCPcopy Create free account
hub / github.com/denoland/std / validateTimestamp

Function validateTimestamp

http/unstable_message_signatures.ts:753–759  ·  view source on GitHub ↗
(value: number, name: string)

Source from the content-addressed store, hash-verified

751// =============================================================================
752
753function validateTimestamp(value: number, name: string): void {
754 if (!Number.isInteger(value) || value < 0) {
755 throw new RangeError(
756 `${name} must be a non-negative integer, got ${value}`,
757 );
758 }
759}
760
761function validateSignParams(params: SignatureParams): void {
762 if (params.label !== undefined && !SF_KEY_REGEXP.test(params.label)) {

Callers 1

validateSignParamsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected