UNPKG

@aikidosec/firewall

Version:

Zen by Aikido is an embedded Application Firewall that autonomously protects Node.js apps against common and critical attacks, provides rate limiting, detects malicious traffic (including bots), and more.

13 lines (12 loc) 539 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = isUUIDString; // Source: https://github.com/uuidjs/uuid/blob/main/src/regex.ts // MIT License - Copyright (c) 2010-2020 Robert Kieffer and other contributors const regex = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i; function isUUIDString(str) { if (str.length !== 36) { return false; } return regex.test(str); }