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.
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> 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.