Uuid
import { Uuid } from "https://raw.githubusercontent.com/i-xi-dev/uuid.es/3.2.2/mod.ts";
The object representation of UUID.
The Uuid
instances are immutable.
Implements version 4 UUID.
class Uuid { }
private constructor(bytes: Uint8Array);
get type(): number;
get variant(): number;
get subtype(): number;
get version(): number;
get unixTimeMilliseconds(): number;
toJSON(): string;
toString(): string;
toURN(): URL;
§Properties
§
unixTimeMilliseconds: number readonly
[src]Timestamp of when the UUID was generated if the UUID version is 7.
If the UUID version is not 7, returns NaN
.
§Methods
§
format(options?: Uuid.FormatOptions): string
[src]Returns a string representation of this UUID.
@param options
- The
UuidFormat.Options
dictionary.
@return
A string representation of this UUID.
§
toString(): string
[src]Returns a string that represents the UUID.
@return
A string that represents the UUID.
§Static Methods
§
Creates an Uuid
object that represents the version 5 or 3 UUID.
@param namespace
- The UUID to be used as namespace ID.
@param name
- The name.
@param subtype
- The version. Defaults to 5 if omitted.
@return
An Uuid
object that represents the version 5 or 3 UUID.
§Variables
Uuid.Namespace |
§Type Aliases
Uuid.FormatOptions | The object with the following optional fields. |