Defines the built-in ParseUUID Pipe
class ParseUUIDPipe implements PipeTransform {
protected static uuidRegExps: {...}
protected exceptionFactory: (errors: string) => any
transform(value: string, metadata: ArgumentMetadata): Promise<string>
protected isUUID(str: unknown, version: string = 'all')
}
Static properties
Property |
Description |
protected static uuidRegExps: {
3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i
}
|
|
Properties
Property |
Description |
protected exceptionFactory: (errors: string) => any
|
|
Methods
|
transform(value: string, metadata: ArgumentMetadata): Promise<string>
Parameters
Returns
Promise<string>
|
isUUID()
|
protected isUUID(str: unknown, version: string = 'all')
Parameters
Option |
Type |
Description |
str
|
unknown |
|
version
|
string |
Optional. Default is 'all' .
|
|