• Overview

    A shorthand function-object for UUID. May be used anywhere when creating new UUIDs.

    Parameters

    Returns UUID

    Example

    // equiv. to `new UUID('f47ac10b-58cc-4372-a567-0e02b2c3d479')`
    uuid('f47ac10b-58cc-4372-a567-0e02b2c3d479')

    // equiv. to `UUID.v4()`
    uuid.v4()

Properties

Properties

v1: ((this, msecs?, nsecs?) => UUID) = UUID.v1

Type declaration

    • (this, msecs?, nsecs?): UUID
    • Creates a new v1 UUID.

      Parameters

      • this: void
      • Optional msecs: number
      • Optional nsecs: number

      Returns UUID

v4: ((this) => UUID) = UUID.v4

Type declaration

    • (this): UUID
    • Creates a new v4 UUID.

      Parameters

      • this: void

      Returns UUID

v6: ((this, msecs?, nsecs?) => UUID) = UUID.v6

Type declaration

    • (this, msecs?, nsecs?): UUID
    • Creates a new v6 UUID.

      Parameters

      • this: void
      • Optional msecs: number
      • Optional nsecs: number

      Returns UUID

v7: ((this, msecs?) => UUID) = UUID.v7

Type declaration

    • (this, msecs?): UUID
    • Creates a new v7 UUID.

      Parameters

      • this: void
      • Optional msecs: number

      Returns UUID