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੐)|#o0aڱ$I>}k&1`U#V?YsV x>{t1[I~D&(I$I/{H0fw"q"y%4 IXyE~M3 8XψL}qE$I[> nD?~sf ]o΁ cT6"?'_Ἣ $I>~.f|'!N?⟩0G KkXZE]ޡ;/&?k OۘH$IRۀwXӨ<7@PnS04aӶp.:@\IWQJ6sS%I$e5ڑv`3:x';wq_vpgHyXZ 3gЂ7{{EuԹn±}$I$8t;b|591nءQ"P6O5i }iR̈́%Q̄p!I䮢]O{H$IRϻ9s֧ a=`- aB\X0"+5"C1Hb?߮3x3&gşggl_hZ^,`5?ߎvĸ%̀M!OZC2#0x LJ0 Gw$I$I}<{Eb+y;iI,`ܚF:5ܛA8-O-|8K7s|#Z8a&><a&/VtbtLʌI$I$I$I$I$I$IRjDD%tEXtdate:create2022-05-31T04:40:26+00:00!Î%tEXtdate:modify2022-05-31T04:40:26+00:00|{2IENDB`Mini Shell

HOME


Mini Shell 1.0
DIR:/proc/self/root/usr/share/doc/node-uuid/
Upload File :
Current File : //proc/self/root/usr/share/doc/node-uuid/README.html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
  <title>README</title>
  <style>
    html {
      line-height: 1.5;
      font-family: Georgia, serif;
      font-size: 20px;
      color: #1a1a1a;
      background-color: #fdfdfd;
    }
    body {
      margin: 0 auto;
      max-width: 36em;
      padding-left: 50px;
      padding-right: 50px;
      padding-top: 50px;
      padding-bottom: 50px;
      hyphens: auto;
      overflow-wrap: break-word;
      text-rendering: optimizeLegibility;
      font-kerning: normal;
    }
    @media (max-width: 600px) {
      body {
        font-size: 0.9em;
        padding: 1em;
      }
      h1 {
        font-size: 1.8em;
      }
    }
    @media print {
      body {
        background-color: transparent;
        color: black;
        font-size: 12pt;
      }
      p, h2, h3 {
        orphans: 3;
        widows: 3;
      }
      h2, h3, h4 {
        page-break-after: avoid;
      }
    }
    p {
      margin: 1em 0;
    }
    a {
      color: #1a1a1a;
    }
    a:visited {
      color: #1a1a1a;
    }
    img {
      max-width: 100%;
    }
    h1, h2, h3, h4, h5, h6 {
      margin-top: 1.4em;
    }
    h5, h6 {
      font-size: 1em;
      font-style: italic;
    }
    h6 {
      font-weight: normal;
    }
    ol, ul {
      padding-left: 1.7em;
      margin-top: 1em;
    }
    li > ol, li > ul {
      margin-top: 0;
    }
    blockquote {
      margin: 1em 0 1em 1.7em;
      padding-left: 1em;
      border-left: 2px solid #e6e6e6;
      color: #606060;
    }
    code {
      font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
      font-size: 85%;
      margin: 0;
    }
    pre {
      margin: 1em 0;
      overflow: auto;
    }
    pre code {
      padding: 0;
      overflow: visible;
      overflow-wrap: normal;
    }
    .sourceCode {
     background-color: transparent;
     overflow: visible;
    }
    hr {
      background-color: #1a1a1a;
      border: none;
      height: 1px;
      margin: 1em 0;
    }
    table {
      margin: 1em 0;
      border-collapse: collapse;
      width: 100%;
      overflow-x: auto;
      display: block;
      font-variant-numeric: lining-nums tabular-nums;
    }
    table caption {
      margin-bottom: 0.75em;
    }
    tbody {
      margin-top: 0.5em;
      border-top: 1px solid #1a1a1a;
      border-bottom: 1px solid #1a1a1a;
    }
    th {
      border-top: 1px solid #1a1a1a;
      padding: 0.25em 0.5em 0.25em 0.5em;
    }
    td {
      padding: 0.125em 0.5em 0.25em 0.5em;
    }
    header {
      margin-bottom: 4em;
      text-align: center;
    }
    #TOC li {
      list-style: none;
    }
    #TOC ul {
      padding-left: 1.3em;
    }
    #TOC > ul {
      padding-left: 0;
    }
    #TOC a:not(:hover) {
      text-decoration: none;
    }
    code{white-space: pre-wrap;}
    span.smallcaps{font-variant: small-caps;}
    span.underline{text-decoration: underline;}
    div.column{display: inline-block; vertical-align: top; width: 50%;}
    div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
    ul.task-list{list-style: none;}
    pre > code.sourceCode { white-space: pre; position: relative; }
    pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
    pre > code.sourceCode > span:empty { height: 1.2em; }
    .sourceCode { overflow: visible; }
    code.sourceCode > span { color: inherit; text-decoration: inherit; }
    div.sourceCode { margin: 1em 0; }
    pre.sourceCode { margin: 0; }
    @media screen {
    div.sourceCode { overflow: auto; }
    }
    @media print {
    pre > code.sourceCode { white-space: pre-wrap; }
    pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
    }
    pre.numberSource code
      { counter-reset: source-line 0; }
    pre.numberSource code > span
      { position: relative; left: -4em; counter-increment: source-line; }
    pre.numberSource code > span > a:first-child::before
      { content: counter(source-line);
        position: relative; left: -1em; text-align: right; vertical-align: baseline;
        border: none; display: inline-block;
        -webkit-touch-callout: none; -webkit-user-select: none;
        -khtml-user-select: none; -moz-user-select: none;
        -ms-user-select: none; user-select: none;
        padding: 0 4px; width: 4em;
        color: #aaaaaa;
      }
    pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
    div.sourceCode
      {   }
    @media screen {
    pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
    }
    code span.al { color: #ff0000; font-weight: bold; } /* Alert */
    code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
    code span.at { color: #7d9029; } /* Attribute */
    code span.bn { color: #40a070; } /* BaseN */
    code span.bu { color: #008000; } /* BuiltIn */
    code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
    code span.ch { color: #4070a0; } /* Char */
    code span.cn { color: #880000; } /* Constant */
    code span.co { color: #60a0b0; font-style: italic; } /* Comment */
    code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
    code span.do { color: #ba2121; font-style: italic; } /* Documentation */
    code span.dt { color: #902000; } /* DataType */
    code span.dv { color: #40a070; } /* DecVal */
    code span.er { color: #ff0000; font-weight: bold; } /* Error */
    code span.ex { } /* Extension */
    code span.fl { color: #40a070; } /* Float */
    code span.fu { color: #06287e; } /* Function */
    code span.im { color: #008000; font-weight: bold; } /* Import */
    code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
    code span.kw { color: #007020; font-weight: bold; } /* Keyword */
    code span.op { color: #666666; } /* Operator */
    code span.ot { color: #007020; } /* Other */
    code span.pp { color: #bc7a00; } /* Preprocessor */
    code span.sc { color: #4070a0; } /* SpecialChar */
    code span.ss { color: #bb6688; } /* SpecialString */
    code span.st { color: #4070a0; } /* String */
    code span.va { color: #19177c; } /* Variable */
    code span.vs { color: #4070a0; } /* VerbatimString */
    code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
    .display.math{display: block; text-align: center; margin: 0.5rem auto;}
  </style>
</head>
<body>
<!--
  -- This file is auto-generated from README_js.md. Changes should be made there.
  -->

<p>For the creation of <a
href="http://www.ietf.org/rfc/rfc4122.txt">RFC4122</a> UUIDs</p>
<ul>
<li><strong>Complete</strong> - Support for RFC4122 version 1, 3, 4, and
5 UUIDs</li>
<li><strong>Cross-platform</strong> - Support for ...
<ul>
<li>CommonJS, <a href="#ecmascript-modules">ECMAScript Modules</a> and
<a href="#cdn-builds">CDN builds</a></li>
<li>Node 8, 10, 12, 14</li>
<li>Chrome, Safari, Firefox, Edge, IE 11 browsers</li>
<li>Webpack and rollup.js module bundlers</li>
<li><a href="#react-native--expo">React Native / Expo</a></li>
</ul></li>
<li><strong>Secure</strong> - Cryptographically-strong random
values</li>
<li><strong>Small</strong> - Zero-dependency, small footprint, plays
nice with "tree shaking" packagers</li>
<li><strong>CLI</strong> - Includes the <a
href="#command-line"><code>uuid</code> command line</a> utility</li>
</ul>
<p><strong>Upgrading from <code>uuid@3.x</code>?</strong> Your code is
probably okay, but check out <a href="#upgrading-from-uuid3x">Upgrading
From <code>uuid@3.x</code></a> for details.</p>
<h2 id="quickstart">Quickstart</h2>
<p>To create a random UUID...</p>
<p><strong>1. Install</strong></p>
<pre class="shell"><code>npm install uuid</code></pre>
<p><strong>2. Create a UUID</strong> (ES6 module syntax)</p>
<div class="sourceCode" id="cb2"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { v4 <span class="im">as</span> uuidv4 } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidv4</span>()<span class="op">;</span> <span class="co">// ⇨ &#39;9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d&#39;</span></span></code></pre></div>
<p>... or using CommonJS syntax:</p>
<div class="sourceCode" id="cb3"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="kw">const</span> { <span class="dt">v4</span><span class="op">:</span> uuidv4 } <span class="op">=</span> <span class="pp">require</span>(<span class="st">&#39;uuid&#39;</span>)<span class="op">;</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidv4</span>()<span class="op">;</span> <span class="co">// ⇨ &#39;1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed&#39;</span></span></code></pre></div>
<p>For timestamp UUIDs, namespace UUIDs, and other options read on
...</p>
<h2 id="api-summary">API Summary</h2>
<table>
<tbody>
<tr class="odd">
<td><a href="#uuidnil"><code>uuid.NIL</code></a></td>
<td>The nil UUID string (all zeros)</td>
<td>New in <code>uuid@8.3</code></td>
</tr>
<tr class="even">
<td><a href="#uuidparsestr"><code>uuid.parse()</code></a></td>
<td>Convert UUID string to array of bytes</td>
<td>New in <code>uuid@8.3</code></td>
</tr>
<tr class="odd">
<td><a
href="#uuidstringifyarr-offset"><code>uuid.stringify()</code></a></td>
<td>Convert array of bytes to UUID string</td>
<td>New in <code>uuid@8.3</code></td>
</tr>
<tr class="even">
<td><a
href="#uuidv1options-buffer-offset"><code>uuid.v1()</code></a></td>
<td>Create a version 1 (timestamp) UUID</td>
<td></td>
</tr>
<tr class="odd">
<td><a
href="#uuidv3name-namespace-buffer-offset"><code>uuid.v3()</code></a></td>
<td>Create a version 3 (namespace w/ MD5) UUID</td>
<td></td>
</tr>
<tr class="even">
<td><a
href="#uuidv4options-buffer-offset"><code>uuid.v4()</code></a></td>
<td>Create a version 4 (random) UUID</td>
<td></td>
</tr>
<tr class="odd">
<td><a
href="#uuidv5name-namespace-buffer-offset"><code>uuid.v5()</code></a></td>
<td>Create a version 5 (namespace w/ SHA-1) UUID</td>
<td></td>
</tr>
<tr class="even">
<td><a href="#uuidvalidatestr"><code>uuid.validate()</code></a></td>
<td>Test a string to see if it is a valid UUID</td>
<td>New in <code>uuid@8.3</code></td>
</tr>
<tr class="odd">
<td><a href="#uuidversionstr"><code>uuid.version()</code></a></td>
<td>Detect RFC version of a UUID</td>
<td>New in <code>uuid@8.3</code></td>
</tr>
</tbody>
</table>
<h2 id="api">API</h2>
<h3 id="uuidnil">uuid.NIL</h3>
<p>The nil UUID string (all zeros).</p>
<p>Example:</p>
<div class="sourceCode" id="cb4"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { NIL <span class="im">as</span> NIL_UUID } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a>NIL_UUID<span class="op">;</span> <span class="co">// ⇨ &#39;00000000-0000-0000-0000-000000000000&#39;</span></span></code></pre></div>
<h3 id="uuidparsestr">uuid.parse(str)</h3>
<p>Convert UUID string to array of bytes</p>
<table>
<tbody>
<tr class="odd">
<td><code>str</code></td>
<td>A valid UUID <code>String</code></td>
</tr>
<tr class="even">
<td><em>returns</em></td>
<td><code>Uint8Array[16]</code></td>
</tr>
<tr class="odd">
<td><em>throws</em></td>
<td><code>TypeError</code> if <code>str</code> is not a valid UUID</td>
</tr>
</tbody>
</table>
<p>Note: Ordering of values in the byte arrays used by
<code>parse()</code> and <code>stringify()</code> follows the left ↠
right order of hex-pairs in UUID strings. As shown in the example
below.</p>
<p>Example:</p>
<div class="sourceCode" id="cb5"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { parse <span class="im">as</span> uuidParse } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="co">// Parse a UUID</span></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="kw">const</span> bytes <span class="op">=</span> <span class="fu">uuidParse</span>(<span class="st">&#39;6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b&#39;</span>)<span class="op">;</span></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a><span class="co">// Convert to hex strings to show byte order (for documentation purposes)</span></span>
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a>[<span class="op">...</span>bytes]<span class="op">.</span><span class="fu">map</span>((v) <span class="kw">=&gt;</span> v<span class="op">.</span><span class="fu">toString</span>(<span class="dv">16</span>)<span class="op">.</span><span class="fu">padStart</span>(<span class="dv">2</span><span class="op">,</span> <span class="st">&#39;0&#39;</span>))<span class="op">;</span> <span class="co">// ⇨ </span></span>
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a>  <span class="co">// [</span></span>
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a>  <span class="co">//   &#39;6e&#39;, &#39;c0&#39;, &#39;bd&#39;, &#39;7f&#39;,</span></span>
<span id="cb5-10"><a href="#cb5-10" aria-hidden="true" tabindex="-1"></a>  <span class="co">//   &#39;11&#39;, &#39;c0&#39;, &#39;43&#39;, &#39;da&#39;,</span></span>
<span id="cb5-11"><a href="#cb5-11" aria-hidden="true" tabindex="-1"></a>  <span class="co">//   &#39;97&#39;, &#39;5e&#39;, &#39;2a&#39;, &#39;8a&#39;,</span></span>
<span id="cb5-12"><a href="#cb5-12" aria-hidden="true" tabindex="-1"></a>  <span class="co">//   &#39;d9&#39;, &#39;eb&#39;, &#39;ae&#39;, &#39;0b&#39;</span></span>
<span id="cb5-13"><a href="#cb5-13" aria-hidden="true" tabindex="-1"></a>  <span class="co">// ]</span></span></code></pre></div>
<h3 id="uuidstringifyarr-offset">uuid.stringify(arr[, offset])</h3>
<p>Convert array of bytes to UUID string</p>
<table>
<tbody>
<tr class="odd">
<td><code>arr</code></td>
<td><code>Array</code>-like collection of 16 values (starting from
<code>offset</code>) between 0-255.</td>
</tr>
<tr class="even">
<td>[<code>offset</code> = 0]</td>
<td><code>Number</code> Starting index in the Array</td>
</tr>
<tr class="odd">
<td><em>returns</em></td>
<td><code>String</code></td>
</tr>
<tr class="even">
<td><em>throws</em></td>
<td><code>TypeError</code> if a valid UUID string cannot be
generated</td>
</tr>
</tbody>
</table>
<p>Note: Ordering of values in the byte arrays used by
<code>parse()</code> and <code>stringify()</code> follows the left ↠
right order of hex-pairs in UUID strings. As shown in the example
below.</p>
<p>Example:</p>
<div class="sourceCode" id="cb6"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { stringify <span class="im">as</span> uuidStringify } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="kw">const</span> uuidBytes <span class="op">=</span> [</span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0x6e</span><span class="op">,</span></span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0xc0</span><span class="op">,</span></span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0xbd</span><span class="op">,</span></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0x7f</span><span class="op">,</span></span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0x11</span><span class="op">,</span></span>
<span id="cb6-9"><a href="#cb6-9" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0xc0</span><span class="op">,</span></span>
<span id="cb6-10"><a href="#cb6-10" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0x43</span><span class="op">,</span></span>
<span id="cb6-11"><a href="#cb6-11" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0xda</span><span class="op">,</span></span>
<span id="cb6-12"><a href="#cb6-12" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0x97</span><span class="op">,</span></span>
<span id="cb6-13"><a href="#cb6-13" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0x5e</span><span class="op">,</span></span>
<span id="cb6-14"><a href="#cb6-14" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0x2a</span><span class="op">,</span></span>
<span id="cb6-15"><a href="#cb6-15" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0x8a</span><span class="op">,</span></span>
<span id="cb6-16"><a href="#cb6-16" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0xd9</span><span class="op">,</span></span>
<span id="cb6-17"><a href="#cb6-17" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0xeb</span><span class="op">,</span></span>
<span id="cb6-18"><a href="#cb6-18" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0xae</span><span class="op">,</span></span>
<span id="cb6-19"><a href="#cb6-19" aria-hidden="true" tabindex="-1"></a>  <span class="bn">0x0b</span><span class="op">,</span></span>
<span id="cb6-20"><a href="#cb6-20" aria-hidden="true" tabindex="-1"></a>]<span class="op">;</span></span>
<span id="cb6-21"><a href="#cb6-21" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-22"><a href="#cb6-22" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidStringify</span>(uuidBytes)<span class="op">;</span> <span class="co">// ⇨ &#39;6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b&#39;</span></span></code></pre></div>
<h3 id="uuidv1options-buffer-offset">uuid.v1([options[, buffer[,
offset]]])</h3>
<p>Create an RFC version 1 (timestamp) UUID</p>
<table>
<tbody>
<tr class="odd">
<td>[<code>options</code>]</td>
<td><code>Object</code> with one or more of the following
properties:</td>
</tr>
<tr class="even">
<td>[<code>options.node</code> ]</td>
<td>RFC "node" field as an <code>Array[6]</code> of byte values (per
4.1.6)</td>
</tr>
<tr class="odd">
<td>[<code>options.clockseq</code>]</td>
<td>RFC "clock sequence" as a <code>Number</code> between 0 -
0x3fff</td>
</tr>
<tr class="even">
<td>[<code>options.msecs</code>]</td>
<td>RFC "timestamp" field (<code>Number</code> of milliseconds, unix
epoch)</td>
</tr>
<tr class="odd">
<td>[<code>options.nsecs</code>]</td>
<td>RFC "timestamp" field (<code>Number</code> of nanseconds to add to
<code>msecs</code>, should be 0-10,000)</td>
</tr>
<tr class="even">
<td>[<code>options.random</code>]</td>
<td><code>Array</code> of 16 random bytes (0-255)</td>
</tr>
<tr class="odd">
<td>[<code>options.rng</code>]</td>
<td>Alternative to <code>options.random</code>, a <code>Function</code>
that returns an <code>Array</code> of 16 random bytes (0-255)</td>
</tr>
<tr class="even">
<td>[<code>buffer</code>]</td>
<td><code>Array | Buffer</code> If specified, uuid will be written here
in byte-form, starting at <code>offset</code></td>
</tr>
<tr class="odd">
<td>[<code>offset</code> = 0]</td>
<td><code>Number</code> Index to start writing UUID bytes in
<code>buffer</code></td>
</tr>
<tr class="even">
<td><em>returns</em></td>
<td>UUID <code>String</code> if no <code>buffer</code> is specified,
otherwise returns <code>buffer</code></td>
</tr>
<tr class="odd">
<td><em>throws</em></td>
<td><code>Error</code> if more than 10M UUIDs/sec are requested</td>
</tr>
</tbody>
</table>
<p>Note: The default <a
href="https://tools.ietf.org/html/rfc4122#section-4.1.6">node id</a>
(the last 12 digits in the UUID) is generated once, randomly, on process
startup, and then remains unchanged for the duration of the process.</p>
<p>Note: <code>options.random</code> and <code>options.rng</code> are
only meaningful on the very first call to <code>v1()</code>, where they
may be passed to initialize the internal <code>node</code> and
<code>clockseq</code> fields.</p>
<p>Example:</p>
<div class="sourceCode" id="cb7"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { v1 <span class="im">as</span> uuidv1 } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidv1</span>()<span class="op">;</span> <span class="co">// ⇨ &#39;2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d&#39;</span></span></code></pre></div>
<p>Example using <code>options</code>:</p>
<div class="sourceCode" id="cb8"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { v1 <span class="im">as</span> uuidv1 } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="kw">const</span> v1options <span class="op">=</span> {</span>
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">node</span><span class="op">:</span> [<span class="bn">0x01</span><span class="op">,</span> <span class="bn">0x23</span><span class="op">,</span> <span class="bn">0x45</span><span class="op">,</span> <span class="bn">0x67</span><span class="op">,</span> <span class="bn">0x89</span><span class="op">,</span> <span class="bn">0xab</span>]<span class="op">,</span></span>
<span id="cb8-5"><a href="#cb8-5" aria-hidden="true" tabindex="-1"></a>  <span class="dt">clockseq</span><span class="op">:</span> <span class="bn">0x1234</span><span class="op">,</span></span>
<span id="cb8-6"><a href="#cb8-6" aria-hidden="true" tabindex="-1"></a>  <span class="dt">msecs</span><span class="op">:</span> <span class="kw">new</span> <span class="bu">Date</span>(<span class="st">&#39;2011-11-01&#39;</span>)<span class="op">.</span><span class="fu">getTime</span>()<span class="op">,</span></span>
<span id="cb8-7"><a href="#cb8-7" aria-hidden="true" tabindex="-1"></a>  <span class="dt">nsecs</span><span class="op">:</span> <span class="dv">5678</span><span class="op">,</span></span>
<span id="cb8-8"><a href="#cb8-8" aria-hidden="true" tabindex="-1"></a>}<span class="op">;</span></span>
<span id="cb8-9"><a href="#cb8-9" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidv1</span>(v1options)<span class="op">;</span> <span class="co">// ⇨ &#39;710b962e-041c-11e1-9234-0123456789ab&#39;</span></span></code></pre></div>
<h3 id="uuidv3name-namespace-buffer-offset">uuid.v3(name, namespace[,
buffer[, offset]])</h3>
<p>Create an RFC version 3 (namespace w/ MD5) UUID</p>
<p>API is identical to <code>v5()</code>, but uses "v3" instead.</p>
<p>⚠️ Note: Per the RFC, "<em>If backward compatibility is not an issue,
SHA-1 [Version 5] is preferred</em>."</p>
<h3 id="uuidv4options-buffer-offset">uuid.v4([options[, buffer[,
offset]]])</h3>
<p>Create an RFC version 4 (random) UUID</p>
<table>
<tbody>
<tr class="odd">
<td>[<code>options</code>]</td>
<td><code>Object</code> with one or more of the following
properties:</td>
</tr>
<tr class="even">
<td>[<code>options.random</code>]</td>
<td><code>Array</code> of 16 random bytes (0-255)</td>
</tr>
<tr class="odd">
<td>[<code>options.rng</code>]</td>
<td>Alternative to <code>options.random</code>, a <code>Function</code>
that returns an <code>Array</code> of 16 random bytes (0-255)</td>
</tr>
<tr class="even">
<td>[<code>buffer</code>]</td>
<td><code>Array | Buffer</code> If specified, uuid will be written here
in byte-form, starting at <code>offset</code></td>
</tr>
<tr class="odd">
<td>[<code>offset</code> = 0]</td>
<td><code>Number</code> Index to start writing UUID bytes in
<code>buffer</code></td>
</tr>
<tr class="even">
<td><em>returns</em></td>
<td>UUID <code>String</code> if no <code>buffer</code> is specified,
otherwise returns <code>buffer</code></td>
</tr>
</tbody>
</table>
<p>Example:</p>
<div class="sourceCode" id="cb9"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { v4 <span class="im">as</span> uuidv4 } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidv4</span>()<span class="op">;</span> <span class="co">// ⇨ &#39;1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed&#39;</span></span></code></pre></div>
<p>Example using predefined <code>random</code> values:</p>
<div class="sourceCode" id="cb10"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { v4 <span class="im">as</span> uuidv4 } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a><span class="kw">const</span> v4options <span class="op">=</span> {</span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a>  <span class="dt">random</span><span class="op">:</span> [</span>
<span id="cb10-5"><a href="#cb10-5" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0x10</span><span class="op">,</span></span>
<span id="cb10-6"><a href="#cb10-6" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0x91</span><span class="op">,</span></span>
<span id="cb10-7"><a href="#cb10-7" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0x56</span><span class="op">,</span></span>
<span id="cb10-8"><a href="#cb10-8" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0xbe</span><span class="op">,</span></span>
<span id="cb10-9"><a href="#cb10-9" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0xc4</span><span class="op">,</span></span>
<span id="cb10-10"><a href="#cb10-10" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0xfb</span><span class="op">,</span></span>
<span id="cb10-11"><a href="#cb10-11" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0xc1</span><span class="op">,</span></span>
<span id="cb10-12"><a href="#cb10-12" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0xea</span><span class="op">,</span></span>
<span id="cb10-13"><a href="#cb10-13" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0x71</span><span class="op">,</span></span>
<span id="cb10-14"><a href="#cb10-14" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0xb4</span><span class="op">,</span></span>
<span id="cb10-15"><a href="#cb10-15" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0xef</span><span class="op">,</span></span>
<span id="cb10-16"><a href="#cb10-16" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0xe1</span><span class="op">,</span></span>
<span id="cb10-17"><a href="#cb10-17" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0x67</span><span class="op">,</span></span>
<span id="cb10-18"><a href="#cb10-18" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0x1c</span><span class="op">,</span></span>
<span id="cb10-19"><a href="#cb10-19" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0x58</span><span class="op">,</span></span>
<span id="cb10-20"><a href="#cb10-20" aria-hidden="true" tabindex="-1"></a>    <span class="bn">0x36</span><span class="op">,</span></span>
<span id="cb10-21"><a href="#cb10-21" aria-hidden="true" tabindex="-1"></a>  ]<span class="op">,</span></span>
<span id="cb10-22"><a href="#cb10-22" aria-hidden="true" tabindex="-1"></a>}<span class="op">;</span></span>
<span id="cb10-23"><a href="#cb10-23" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidv4</span>(v4options)<span class="op">;</span> <span class="co">// ⇨ &#39;109156be-c4fb-41ea-b1b4-efe1671c5836&#39;</span></span></code></pre></div>
<h3 id="uuidv5name-namespace-buffer-offset">uuid.v5(name, namespace[,
buffer[, offset]])</h3>
<p>Create an RFC version 5 (namespace w/ SHA-1) UUID</p>
<table>
<tbody>
<tr class="odd">
<td><code>name</code></td>
<td><code>String | Array</code></td>
</tr>
<tr class="even">
<td><code>namespace</code></td>
<td><code>String | Array[16]</code> Namespace UUID</td>
</tr>
<tr class="odd">
<td>[<code>buffer</code>]</td>
<td><code>Array | Buffer</code> If specified, uuid will be written here
in byte-form, starting at <code>offset</code></td>
</tr>
<tr class="even">
<td>[<code>offset</code> = 0]</td>
<td><code>Number</code> Index to start writing UUID bytes in
<code>buffer</code></td>
</tr>
<tr class="odd">
<td><em>returns</em></td>
<td>UUID <code>String</code> if no <code>buffer</code> is specified,
otherwise returns <code>buffer</code></td>
</tr>
</tbody>
</table>
<p>Note: The RFC <code>DNS</code> and <code>URL</code> namespaces are
available as <code>v5.DNS</code> and <code>v5.URL</code>.</p>
<p>Example with custom namespace:</p>
<div class="sourceCode" id="cb11"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { v5 <span class="im">as</span> uuidv5 } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a><span class="co">// Define a custom namespace.  Readers, create your own using something like</span></span>
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a><span class="co">// https://www.uuidgenerator.net/</span></span>
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a><span class="kw">const</span> MY_NAMESPACE <span class="op">=</span> <span class="st">&#39;1b671a64-40d5-491e-99b0-da01ff1f3341&#39;</span><span class="op">;</span></span>
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb11-7"><a href="#cb11-7" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidv5</span>(<span class="st">&#39;Hello, World!&#39;</span><span class="op">,</span> MY_NAMESPACE)<span class="op">;</span> <span class="co">// ⇨ &#39;630eb68f-e0fa-5ecc-887a-7c7a62614681&#39;</span></span></code></pre></div>
<p>Example with RFC <code>URL</code> namespace:</p>
<div class="sourceCode" id="cb12"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { v5 <span class="im">as</span> uuidv5 } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidv5</span>(<span class="st">&#39;https://www.w3.org/&#39;</span><span class="op">,</span> uuidv5<span class="op">.</span><span class="at">URL</span>)<span class="op">;</span> <span class="co">// ⇨ &#39;c106a26a-21bb-5538-8bf2-57095d1976c1&#39;</span></span></code></pre></div>
<h3 id="uuidvalidatestr">uuid.validate(str)</h3>
<p>Test a string to see if it is a valid UUID</p>
<table>
<tbody>
<tr class="odd">
<td><code>str</code></td>
<td><code>String</code> to validate</td>
</tr>
<tr class="even">
<td><em>returns</em></td>
<td><code>true</code> if string is a valid UUID, <code>false</code>
otherwise</td>
</tr>
</tbody>
</table>
<p>Example:</p>
<div class="sourceCode" id="cb13"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { validate <span class="im">as</span> uuidValidate } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidValidate</span>(<span class="st">&#39;not a UUID&#39;</span>)<span class="op">;</span> <span class="co">// ⇨ false</span></span>
<span id="cb13-4"><a href="#cb13-4" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidValidate</span>(<span class="st">&#39;6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b&#39;</span>)<span class="op">;</span> <span class="co">// ⇨ true</span></span></code></pre></div>
<p>Using <code>validate</code> and <code>version</code> together it is
possible to do per-version validation, e.g. validate for only v4
UUIds.</p>
<div class="sourceCode" id="cb14"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { version <span class="im">as</span> uuidVersion } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { validate <span class="im">as</span> uuidValidate } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb14-4"><a href="#cb14-4" aria-hidden="true" tabindex="-1"></a><span class="kw">function</span> <span class="fu">uuidValidateV4</span>(uuid) {</span>
<span id="cb14-5"><a href="#cb14-5" aria-hidden="true" tabindex="-1"></a>  <span class="cf">return</span> <span class="fu">uuidValidate</span>(uuid) <span class="op">&amp;&amp;</span> <span class="fu">uuidVersion</span>(uuid) <span class="op">===</span> <span class="dv">4</span><span class="op">;</span></span>
<span id="cb14-6"><a href="#cb14-6" aria-hidden="true" tabindex="-1"></a>}</span>
<span id="cb14-7"><a href="#cb14-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb14-8"><a href="#cb14-8" aria-hidden="true" tabindex="-1"></a><span class="kw">const</span> v1Uuid <span class="op">=</span> <span class="st">&#39;d9428888-122b-11e1-b85c-61cd3cbb3210&#39;</span><span class="op">;</span></span>
<span id="cb14-9"><a href="#cb14-9" aria-hidden="true" tabindex="-1"></a><span class="kw">const</span> v4Uuid <span class="op">=</span> <span class="st">&#39;109156be-c4fb-41ea-b1b4-efe1671c5836&#39;</span><span class="op">;</span></span>
<span id="cb14-10"><a href="#cb14-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb14-11"><a href="#cb14-11" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidValidateV4</span>(v4Uuid)<span class="op">;</span> <span class="co">// ⇨ true</span></span>
<span id="cb14-12"><a href="#cb14-12" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidValidateV4</span>(v1Uuid)<span class="op">;</span> <span class="co">// ⇨ false</span></span></code></pre></div>
<h3 id="uuidversionstr">uuid.version(str)</h3>
<p>Detect RFC version of a UUID</p>
<table>
<tbody>
<tr class="odd">
<td><code>str</code></td>
<td>A valid UUID <code>String</code></td>
</tr>
<tr class="even">
<td><em>returns</em></td>
<td><code>Number</code> The RFC version of the UUID</td>
</tr>
<tr class="odd">
<td><em>throws</em></td>
<td><code>TypeError</code> if <code>str</code> is not a valid UUID</td>
</tr>
</tbody>
</table>
<p>Example:</p>
<div class="sourceCode" id="cb15"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { version <span class="im">as</span> uuidVersion } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidVersion</span>(<span class="st">&#39;45637ec4-c85f-11ea-87d0-0242ac130003&#39;</span>)<span class="op">;</span> <span class="co">// ⇨ 1</span></span>
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidVersion</span>(<span class="st">&#39;6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b&#39;</span>)<span class="op">;</span> <span class="co">// ⇨ 4</span></span></code></pre></div>
<h2 id="command-line">Command Line</h2>
<p>UUIDs can be generated from the command line using
<code>uuid</code>.</p>
<pre class="shell"><code>$ uuid
ddeb27fb-d9a0-4624-be4d-4615062daed4</code></pre>
<p>The default is to generate version 4 UUIDS, however the other
versions are supported. Type <code>uuid --help</code> for details:</p>
<pre class="shell"><code>$ uuid --help

Usage:
  uuid
  uuid v1
  uuid v3 &lt;name&gt; &lt;namespace uuid&gt;
  uuid v4
  uuid v5 &lt;name&gt; &lt;namespace uuid&gt;
  uuid --help

Note: &lt;namespace uuid&gt; may be &quot;URL&quot; or &quot;DNS&quot; to use the corresponding UUIDs
defined by RFC4122</code></pre>
<h2 id="ecmascript-modules">ECMAScript Modules</h2>
<p>This library comes with <a
href="https://www.ecma-international.org/ecma-262/6.0/#sec-modules">ECMAScript
Modules</a> (ESM) support for Node.js versions that support it (<a
href="./examples/node-esmodules/">example</a>) as well as bundlers like
<a href="https://rollupjs.org/guide/en/#tree-shaking">rollup.js</a> (<a
href="./examples/browser-rollup/">example</a>) and <a
href="https://webpack.js.org/guides/tree-shaking/">webpack</a> (<a
href="./examples/browser-webpack/">example</a>) (targeting both, Node.js
and browser environments).</p>
<div class="sourceCode" id="cb18"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { v4 <span class="im">as</span> uuidv4 } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidv4</span>()<span class="op">;</span> <span class="co">// ⇨ &#39;1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed&#39;</span></span></code></pre></div>
<p>To run the examples you must first create a dist build of this
library in the module root:</p>
<pre class="shell"><code>npm run build</code></pre>
<h2 id="cdn-builds">CDN Builds</h2>
<h3 id="ecmascript-modules-1">ECMAScript Modules</h3>
<p>To load this module directly into modern browsers that <a
href="https://caniuse.com/#feat=es6-module">support loading ECMAScript
Modules</a> you can make use of <a
href="https://jspm.org/">jspm</a>:</p>
<div class="sourceCode" id="cb20"><pre
class="sourceCode html"><code class="sourceCode html"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;script</span><span class="ot"> type=</span><span class="st">&quot;module&quot;</span><span class="kw">&gt;</span></span>
<span id="cb20-2"><a href="#cb20-2" aria-hidden="true" tabindex="-1"></a>  <span class="im">import</span> { v4 <span class="im">as</span> uuidv4 } <span class="im">from</span> <span class="st">&#39;https://jspm.dev/uuid&#39;</span><span class="op">;</span></span>
<span id="cb20-3"><a href="#cb20-3" aria-hidden="true" tabindex="-1"></a>  <span class="bu">console</span><span class="op">.</span><span class="fu">log</span>(<span class="fu">uuidv4</span>())<span class="op">;</span> <span class="co">// ⇨ &#39;1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed&#39;</span></span>
<span id="cb20-4"><a href="#cb20-4" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;/script&gt;</span></span></code></pre></div>
<h3 id="umd">UMD</h3>
<p>To load this module directly into older browsers you can use the <a
href="https://github.com/umdjs/umd">UMD (Universal Module
Definition)</a> builds from any of the following CDNs:</p>
<p><strong>Using <a
href="https://unpkg.com/uuid@latest/dist/umd/">UNPKG</a></strong>:</p>
<div class="sourceCode" id="cb21"><pre
class="sourceCode html"><code class="sourceCode html"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;script</span> <span class="er">src</span><span class="ot">=</span><span class="st">&quot;https://unpkg.com/uuid@latest/dist/umd/uuidv4.min.js&quot;</span><span class="kw">&gt;&lt;/script&gt;</span></span></code></pre></div>
<p><strong>Using <a
href="https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/">jsDelivr</a></strong>:</p>
<div class="sourceCode" id="cb22"><pre
class="sourceCode html"><code class="sourceCode html"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;script</span> <span class="er">src</span><span class="ot">=</span><span class="st">&quot;https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/uuidv4.min.js&quot;</span><span class="kw">&gt;&lt;/script&gt;</span></span></code></pre></div>
<p><strong>Using <a
href="https://cdnjs.com/libraries/uuid">cdnjs</a></strong>:</p>
<div class="sourceCode" id="cb23"><pre
class="sourceCode html"><code class="sourceCode html"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;script</span> <span class="er">src</span><span class="ot">=</span><span class="st">&quot;https://cdnjs.cloudflare.com/ajax/libs/uuid/8.1.0/uuidv4.min.js&quot;</span><span class="kw">&gt;&lt;/script&gt;</span></span></code></pre></div>
<p>These CDNs all provide the same <a
href="#uuidv4options-buffer-offset"><code>uuidv4()</code></a>
method:</p>
<div class="sourceCode" id="cb24"><pre
class="sourceCode html"><code class="sourceCode html"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;script&gt;</span></span>
<span id="cb24-2"><a href="#cb24-2" aria-hidden="true" tabindex="-1"></a>  <span class="fu">uuidv4</span>()<span class="op">;</span> <span class="co">// ⇨ &#39;55af1e37-0734-46d8-b070-a1e42e4fc392&#39;</span></span>
<span id="cb24-3"><a href="#cb24-3" aria-hidden="true" tabindex="-1"></a><span class="kw">&lt;/script&gt;</span></span></code></pre></div>
<p>Methods for the other algorithms (<a
href="#uuidv1options-buffer-offset"><code>uuidv1()</code></a>, <a
href="#uuidv3name-namespace-buffer-offset"><code>uuidv3()</code></a> and
<a href="#uuidv5name-namespace-buffer-offset"><code>uuidv5()</code></a>)
are available from the files <code>uuidv1.min.js</code>,
<code>uuidv3.min.js</code> and <code>uuidv5.min.js</code>
respectively.</p>
<h2 id="getrandomvalues-not-supported">"getRandomValues() not
supported"</h2>
<p>This error occurs in environments where the standard <a
href="https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues"><code>crypto.getRandomValues()</code></a>
API is not supported. This issue can be resolved by adding an
appropriate polyfill:</p>
<h3 id="react-native--expo">React Native / Expo</h3>
<ol type="1">
<li>Install <a
href="https://github.com/LinusU/react-native-get-random-values#readme"><code>react-native-get-random-values</code></a></li>
<li>Import it <em>before</em> <code>uuid</code>. Since <code>uuid</code>
might also appear as a transitive dependency of some other imports it's
safest to just import <code>react-native-get-random-values</code> as the
very first thing in your entry point:</li>
</ol>
<div class="sourceCode" id="cb25"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> <span class="st">&#39;react-native-get-random-values&#39;</span><span class="op">;</span></span>
<span id="cb25-2"><a href="#cb25-2" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { v4 <span class="im">as</span> uuidv4 } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span></code></pre></div>
<p>Note: If you are using Expo, you must be using at least
<code>react-native-get-random-values@1.5.0</code> and
<code>expo@39.0.0</code>.</p>
<h3 id="web-workers--service-workers-edge--18">Web Workers / Service
Workers (Edge &lt;= 18)</h3>
<p><a href="https://caniuse.com/#feat=cryptography">In Edge &lt;= 18,
Web Crypto is not supported in Web Workers or Service Workers</a> and we
are not aware of a polyfill (let us know if you find one, please).</p>
<h2 id="upgrading-from-uuid7x">Upgrading From <code>uuid@7.x</code></h2>
<h3 id="only-named-exports-supported-when-using-with-nodejs-esm">Only
Named Exports Supported When Using with Node.js ESM</h3>
<p><code>uuid@7.x</code> did not come with native ECMAScript Module
(ESM) support for Node.js. Importing it in Node.js ESM consequently
imported the CommonJS source with a default export. This library now
comes with true Node.js ESM support and only provides named exports.</p>
<p>Instead of doing:</p>
<div class="sourceCode" id="cb26"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> uuid <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb26-2"><a href="#cb26-2" aria-hidden="true" tabindex="-1"></a>uuid<span class="op">.</span><span class="fu">v4</span>()<span class="op">;</span></span></code></pre></div>
<p>you will now have to use the named exports:</p>
<div class="sourceCode" id="cb27"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { v4 <span class="im">as</span> uuidv4 } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb27-2"><a href="#cb27-2" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidv4</span>()<span class="op">;</span></span></code></pre></div>
<h3 id="deep-requires-no-longer-supported">Deep Requires No Longer
Supported</h3>
<p>Deep requires like <code>require('uuid/v4')</code> <a
href="#deep-requires-now-deprecated">which have been deprecated in
<code>uuid@7.x</code></a> are no longer supported.</p>
<h2 id="upgrading-from-uuid3x">Upgrading From <code>uuid@3.x</code></h2>
<p>"<em>Wait... what happened to <code>uuid@4.x</code> -
<code>uuid@6.x</code>?!?</em>"</p>
<p>In order to avoid confusion with RFC <a
href="#uuidv4options-buffer-offset">version 4</a> and <a
href="#uuidv5name-namespace-buffer-offset">version 5</a> UUIDs, and a
possible <a href="http://gh.peabody.io/uuidv6/">version 6</a>, releases
4 thru 6 of this module have been skipped.</p>
<h3 id="deep-requires-now-deprecated">Deep Requires Now Deprecated</h3>
<p><code>uuid@3.x</code> encouraged the use of deep requires to minimize
the bundle size of browser builds:</p>
<div class="sourceCode" id="cb28"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a><span class="kw">const</span> uuidv4 <span class="op">=</span> <span class="pp">require</span>(<span class="st">&#39;uuid/v4&#39;</span>)<span class="op">;</span> <span class="co">// &lt;== NOW </span><span class="al">DEPRECATED</span><span class="co">!</span></span>
<span id="cb28-2"><a href="#cb28-2" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidv4</span>()<span class="op">;</span></span></code></pre></div>
<p>As of <code>uuid@7.x</code> this library now provides ECMAScript
modules builds, which allow packagers like Webpack and Rollup to do
"tree-shaking" to remove dead code. Instead, use the <code>import</code>
syntax:</p>
<div class="sourceCode" id="cb29"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { v4 <span class="im">as</span> uuidv4 } <span class="im">from</span> <span class="st">&#39;uuid&#39;</span><span class="op">;</span></span>
<span id="cb29-2"><a href="#cb29-2" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidv4</span>()<span class="op">;</span></span></code></pre></div>
<p>... or for CommonJS:</p>
<div class="sourceCode" id="cb30"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true" tabindex="-1"></a><span class="kw">const</span> { <span class="dt">v4</span><span class="op">:</span> uuidv4 } <span class="op">=</span> <span class="pp">require</span>(<span class="st">&#39;uuid&#39;</span>)<span class="op">;</span></span>
<span id="cb30-2"><a href="#cb30-2" aria-hidden="true" tabindex="-1"></a><span class="fu">uuidv4</span>()<span class="op">;</span></span></code></pre></div>
<h3 id="default-export-removed">Default Export Removed</h3>
<p><code>uuid@3.x</code> was exporting the Version 4 UUID method as a
default export:</p>
<div class="sourceCode" id="cb31"><pre
class="sourceCode javascript"><code class="sourceCode javascript"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a><span class="kw">const</span> uuid <span class="op">=</span> <span class="pp">require</span>(<span class="st">&#39;uuid&#39;</span>)<span class="op">;</span> <span class="co">// &lt;== REMOVED!</span></span></code></pre></div>
<p>This usage pattern was already discouraged in <code>uuid@3.x</code>
and has been removed in <code>uuid@7.x</code>.</p>
<hr />
<p>Markdown generated from <a href="README_js.md">README_js.md</a> by <a
href="https://github.com/broofa/runmd"><img
src="http://i.imgur.com/h0FVyzU.png" alt="RunMD Logo" /></a></p>
</body>
</html>