belgattitude/httpx

View on GitHub
packages/assert/docs/api/uuid.guards/functions/isUuid.md

Summary

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

***

[@httpx/assert v0.12.4](../../README.md) / [uuid.guards](../README.md) / isUuid

# Function: isUuid()

> **isUuid**(`v`, `version`?): `v is Uuid`

Check whether a value is string and passes uuid validation with
optional given version

## Parameters

• **v**: `unknown`

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

## Returns

`v is Uuid`

## Defined in

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