pureweb.util. guidUtil

The guidUtil namespace provides utility methods to create globally unique identifiers (GUIDs), and perform operations on them. It is used, for example, to work with session IDs.

Method Summary

createGuid
Creates a GUID-formatted string.
isAGuid
Returns a Boolean value that indicates whether the specified string is a GUID.
randomGuid
Creates a globally unique identifier (GUID) string, based on a random algorithm, with the appropriate ISO flags.

Members

<static, constant> EMPTY_GUID

Returns an empty GUID.

Method Detail

<static> createGuid(id) → {string}

Creates a GUID-formatted string. The string will be 36 characters long. Note, this is not an actual Global Unique Identifier.
Parameters:
Name Type Description
id string An integer ID to initialize the GUID with.

<static> isAGuid(testMe) → {boolean}

Returns a Boolean value that indicates whether the specified string is a GUID. Will return true if it is, or false otherwise.
Parameters:
Name Type Description
testMe string | null The URI to test.

<static> randomGuid() → {string}

Creates a globally unique identifier (GUID) string, based on a random algorithm, with the appropriate ISO flags. The string will be 36 characters long.