is the string to use to initialize the Guid object. If its not valid an empty GUID string will be used.
Checks if the current Guid object is equal to the provided one.
represents the Guid object to compare to this one.
true if this object value is equal to the provided one.
Attempts to get the number GUID value for the current object.
the hex number representing the Guid value or -1 if its value cannot be parsed.
Checks if the current internal value is empty (all zeroes value).
true if the object has an empty value.
Checks if the current internal value is a valid v4 GUID.
true if its a valid v4 GUID value.
Returns the object value as number.
the hex number representing the Guid value.
Returns the object value as string.
the string representing the Guid value.
Returns a new Guid object with an all zeroes internal value.
new Guid object with an internal value with all zeroes (an empty GUID, non valid).
Generates a string with a valid GUID v4 value from a custom Crypto object or the defaults.
a valid GUID v4 value as a string.
Generates an Uint8Array with 16 random values generated using the crypto object provided or the defaults.
is the Crypto implementation to use instead of the defaults.
an Uint8Array with 16 random values.
Returns the Crypto object that implements the Crypto API from the browser.
Crypto object from the browser implementation.
Generates an Uint8Array with 16 random values generated using the crypto object provided.
is the Crypto implementation to use to generate the random values to fill the array.
an Uint8Array with 16 random values.
Generates an Uint8Array with 16 random values generated using the Math.random() method.
an Uint8Array with 16 random values.
Checks if a string represents a valid v4 GUID.
true if its a valid v4 GUID value represented as string.
Returns a Guid object with a random valid UUID v4 value. The method allows the use of a custom random value generator that implements the Crypto API. The internal guid value is generated using the provided generator (if any), if not provided, it attempts to generate random values from the Crypto API of the browser. If the browser does not support the Crypto API, Math.random() is used as a fallback to generate random values.
A new Guid object with a valid random value generated by the provided generator or the defaults.
Sets the bytes of an Uint8Array to match the RFC definition of v4 GUIDs.
is the array to be modified.
Generated using TypeDoc
Creates a new Guid object using a string, if no string is provided (or the string is not valid), the Guid value will be initialized with all zeroes (empty Guid).