lib/heimdallr-validator.js
function validUUID(uuid) {
    // xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where x is a hexadecimal digit and
    // y is 8,9, A, or B
    var uuidRegex = /^[0-9a-f]{8}\-[0-9a-f]{4}\-4[0-9a-f]{3}\-[89ab][0-9a-f]{3}\-[0-9a-f]{12}$/i,
        result;

    result = uuidRegex.exec(uuid);

    return result !== null;
}
function validUUID(uuid) {
    // xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where x is a hexadecimal digit and
    // y is 8,9, A, or B
    var uuidRegex = /^[0-9a-f]{8}\-[0-9a-f]{4}\-4[0-9a-f]{3}\-[89ab][0-9a-f]{3}\-[0-9a-f]{12}$/i,
        result;

    result = uuidRegex.exec(uuid);

    return result !== null;
}
function validUUID ( uuid ) { // xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where x is a hexadecimal digit and // y is 8,9, A, or B var uuidRegex = / ^[0-9a-f]{8}\-[0-9a-f]{4}\-4[0-9a-f]{3}\-[89ab][0-9a-f]{3}\-[0-9a-f]{12}$ / i , result ; result = uuidRegex . exec ( uuid ) ; return result !== null ; }
Verifies that the input string follows the RFC 4122 v4 UUID standard.

@arg {string} uuid - The UUID to validate.
@return {boolean} True if <tt>uuid</tt> is a valid v4 UUID.
Verifies that the input string follows the RFC 4122 v4 UUID standard .