MCPcopy
hub / github.com/FlowiseAI/Flowise / isValidUUID

Function isValidUUID

packages/components/src/validator.ts:10–14  ·  view source on GitHub ↗
(uuid: string)

Source from the content-addressed store, hash-verified

8 * @returns {boolean} True if valid UUID, false otherwise
9 */
10export const isValidUUID = (uuid: string): boolean => {
11 // UUID v4 regex pattern
12 const uuidV4Pattern = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i
13 return uuidV4Pattern.test(uuid)
14}
15
16/**
17 * Validates if a string is a valid URL safe for interpolation into JS code.

Callers 9

initMethod · 0.90
initMethod · 0.90
initMethod · 0.90
validateChatflowIdFunction · 0.90
streamUploadedFileFunction · 0.85
createFileAttachmentFunction · 0.85
validateChatflowDomainFunction · 0.85
getChatflowByIdFunction · 0.85

Calls 1

testMethod · 0.80

Tested by

no test coverage detected