belgattitude/httpx

View on GitHub
packages/assert/docs/api/uuid.asserts/functions/assertUuid.md

Summary

Maintainability
Test Coverage
[**@httpx/assert v0.12.4**](../../README.md) • **Docs**

***

[@httpx/assert v0.12.4](../../README.md) / [uuid.asserts](../README.md) / assertUuid

# Function: assertUuid()

> **assertUuid**(`v`, `msgOrErrorFactory`?, `options`?): `asserts v is Uuid`

Asserts a value is a valid uuid v1, v3, v4 or v5
Accept optional version

## Parameters

• **v**: `unknown`

• **msgOrErrorFactory?**: `MsgOrErrorFactory`

• **options?**

• **options.version?**: [`UuidVersion`](../../uuid.types/type-aliases/UuidVersion.md)

## Returns

`asserts v is Uuid`

## Throws

TypeError

## Defined in

[uuid.asserts.ts:24](https://github.com/belgattitude/httpx/blob/acde85be3548fccd6cc1a311d7f8d4419e2b6ce0/packages/assert/src/uuid.asserts.ts#L24)