Constructor
new Uuid(buffer)
Creates a new instance of Uuid based on a Buffer
Parameters:
Name | Type | Description |
---|---|---|
buffer |
Buffer | The 16-length buffer. |
- Source:
Members
(readonly) buffer :Buffer
Returns the underlying buffer
Type:
- Buffer
- Source:
uuidRegex
Used to check if the UUID is in a correct format Source: https://stackoverflow.com/a/6640851 Verified also with documentation of UUID library in Rust: https://docs.rs/uuid/latest/uuid/
- Source:
Methods
equals(other)
Compares this object to the specified object. The result is true if and only if the argument is not null, is a UUID object, and contains the same value, bit for bit, as this UUID.
Parameters:
Name | Type | Description |
---|---|---|
other |
Uuid | The other value to test for equality. |
- Source:
getBuffer() → {Buffer}
Gets the bytes representation of a Uuid
- Source:
Returns:
- Type
- Buffer
(package) getInternal() → {rust.UuidWrapper}
- Source:
Returns:
- Type
- rust.UuidWrapper
inspect() → {string}
Provide the name of the constructor and the string representation
- Source:
Returns:
- Type
- string
toJSON()
Returns the string representation. Method used by the native JSON.stringify() to serialize this instance.
- Source:
toString() → {string}
Returns a string representation of the value of this Uuid instance. 32 hex separated by hyphens, in the form of 00000000-0000-0000-0000-000000000000.
- Source:
Returns:
- Type
- string
(package, static) fromRust(buffer) → {Uuid}
Parameters:
Name | Type | Description |
---|---|---|
buffer |
Buffer |
- Source:
Returns:
- Type
- Uuid
(static) fromString(value) → {Uuid}
Parses a string representation of a Uuid
Parameters:
Name | Type | Description |
---|---|---|
value |
string |
- Source:
Returns:
- Type
- Uuid
(static) random(callbackopt) → {Uuid}
Creates a new random (version 4) Uuid.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
Optional callback to be invoked with the error as first parameter and the created Uuid as second parameter. |
- Source:
Returns:
- Type
- Uuid