uuid

  • Version 14.0.0
  • Published
  • 70.3 kB
  • No dependencies
  • MIT license

Install

npm i uuid
yarn add uuid
pnpm add uuid

Overview

RFC9562 UUIDs

Index

Variables

variable MAX

const MAX: string;

    variable NIL

    const NIL: string;

      Functions

      function parse

      parse: (uuid: string) => NonSharedArrayBuffer;

        function stringify

        stringify: (arr: Uint8Array, offset?: number) => string;

          function v1

          v1: {
          (options?: Version1Options, buf?: undefined, offset?: number): string;
          <Buf extends Uint8Array = Uint8Array>(
          options: Version1Options,
          buf: Buf,
          offset?: number
          ): Buf;
          };

            function v1ToV6

            v1ToV6: { (uuid: string): string; (uuid: Uint8Array): Uint8Array };

              function v3

              v3: typeof v3;

                function v4

                v4: {
                (options?: Version4Options, buf?: undefined, offset?: number): string;
                <TBuf extends Uint8Array = Uint8Array>(
                options: Version4Options,
                buf: TBuf,
                offset?: number
                ): TBuf;
                };

                  function v5

                  v5: typeof v5;

                    function v6

                    v6: {
                    (options?: Version6Options, buf?: undefined, offset?: number): string;
                    <TBuf extends Uint8Array = Uint8Array>(
                    options: Version1Options,
                    buf: TBuf,
                    offset?: number
                    ): TBuf;
                    };

                      function v6ToV1

                      v6ToV1: { (uuid: string): string; (uuid: Uint8Array): Uint8Array };

                        function v7

                        v7: {
                        (options?: Version7Options, buf?: undefined, offset?: number): string;
                        <TBuf extends Uint8Array = Uint8Array>(
                        options: Version7Options,
                        buf: TBuf,
                        offset?: number
                        ): TBuf;
                        };

                          function validate

                          validate: (uuid: unknown) => boolean;

                            function version

                            version: (uuid: string) => number;

                              Type Aliases

                              type NonSharedArrayBuffer

                              type NonSharedArrayBuffer = ReturnType<typeof Uint8Array.of>;

                                type UUIDTypes

                                type UUIDTypes<TBuf extends Uint8Array = Uint8Array> = string | TBuf;

                                  type Version1Options

                                  type Version1Options = {
                                  node?: Uint8Array;
                                  clockseq?: number;
                                  random?: Uint8Array;
                                  rng?: () => Uint8Array;
                                  msecs?: number;
                                  nsecs?: number;
                                  _v6?: boolean;
                                  };

                                    type Version4Options

                                    type Version4Options = {
                                    random?: Uint8Array;
                                    rng?: () => Uint8Array;
                                    };

                                      type Version6Options

                                      type Version6Options = Version1Options;

                                        type Version7Options

                                        type Version7Options = {
                                        random?: Uint8Array;
                                        msecs?: number;
                                        seq?: number;
                                        rng?: () => Uint8Array;
                                        };

                                          Namespaces

                                          namespace v3

                                          namespace v3 {}

                                            variable DNS

                                            var DNS: string;

                                              variable URL

                                              var URL: string;

                                                namespace v5

                                                namespace v5 {}

                                                  variable DNS

                                                  var DNS: string;

                                                    variable URL

                                                    var URL: string;

                                                      Package Files (16)

                                                      Dependencies (0)

                                                      No dependencies.

                                                      Dev Dependencies (15)

                                                      Peer Dependencies (0)

                                                      No peer dependencies.

                                                      Badge

                                                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/uuid.

                                                      • Markdown
                                                        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/uuid)
                                                      • HTML
                                                        <a href="https://www.jsdocs.io/package/uuid"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>