belgattitude/httpx

View on GitHub
packages/assert/src/uuid.utils.ts

Summary

Maintainability
A
0 mins
Test Coverage
/**
 * Taken from https://github.com/uuidjs/uuid/blob/main/src/regex.js
 */
export const uuidRegexp =
  // eslint-disable-next-line sonarjs/regex-complexity
  /^(?:[\da-f]{8}-[\da-f]{4}-[1-5][\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}|0{8}-(?:0{4}-){3}0{12})$/i;

export const uuidSupportedVersions = new Set([1, 3, 4, 5, 7]);