Documentation / Guid
Guid
Classes
Guid
Represents a Guid according to the http://www.ietf.org/rfc/rfc4122.txt
Export
Guid
Implements
Constructors
new Guid()
new Guid(
bytes):Guid
Initializes a new instance of the {Guid} class.
Parameters
bytes
The 16 bytes that represents a {Guid}.
number[] | Uint8Array<ArrayBufferLike>
Returns
Defined in
Properties
bytes
readonlybytes:number[] |Uint8Array<ArrayBufferLike>
The 16 bytes that represents a {Guid}.
Defined in
empty
readonlystaticempty:Guid
Gets an empty {Guid}
Defined in
Methods
equals()
equals(
other):boolean
Check whether this is equal to other.
Parameters
other
object
Returns
boolean
Implementation of
Defined in
toJSON()
toJSON():
string
Converts the {Guid} to a string that works in JSON serialization.
Returns
string
Defined in
toString()
toString():
string
Return a string representation of the {Guid} in the format: 00000000-0000-0000-0000-000000000000
Returns
string
Defined in
as()
staticas<T>(input):T
Parses if the type is a string parse, otherwise pass through the input as desired output type.
Type Parameters
Type to handle for
Parameters
input
String or the generic type.
string | T
Returns
T
identifier Parsed or passed through
Defined in
create()
staticcreate():Guid
Create a new {Guid}
Returns
Defined in
isGuid()
staticisGuid(value):boolean
Check if a string is a valid {Guid}
Parameters
value
string
Value to check.
Returns
boolean
True if it is, false if not.
Defined in
parse()
staticparse(guid):Guid
Parses a string and turns it into a {Guid}.
Parameters
guid
string
String representation of guid.