Skip to content

Commit 36e59b0

Browse files
committed
v4.2.10 Released
Removed: - `test` directory from distribution. Maintenance: - Add badges to README. - Updated dev dependencies.
1 parent 0d610f4 commit 36e59b0

File tree

8 files changed

+288
-246
lines changed

8 files changed

+288
-246
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/docs/
2+
/test/

README.md

Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# NAME
1+
# UUID.js - RFC-compliant UUID Generator for JavaScript
22

3-
UUID.js - RFC-compliant UUID Generator for JavaScript
3+
[![npm](https://img.shields.io/npm/v/uuidjs)](https://www.npmjs.com/package/uuidjs)
4+
[![License](https://img.shields.io/npm/l/uuidjs)](https://github.com/LiosK/UUID.js/blob/master/LICENSE.txt)
45

5-
# SYNOPSIS
6+
## Synopsis
67

78
```html
89
<!-- HTML5 -->
@@ -18,7 +19,7 @@ let uuid = UUID.generate();
1819

1920
```typescript
2021
// TypeScript
21-
import UUID from 'uuidjs';
22+
import UUID from "uuidjs";
2223
let str: string = UUID.generate();
2324
let obj: UUID = UUID.genV4();
2425
```
@@ -28,20 +29,30 @@ let obj: UUID = UUID.genV4();
2829
npx uuidjs
2930
```
3031

31-
# DESCRIPTION
32+
## Description
3233

33-
UUID.js is a JavaScript/ECMAScript library to generate RFC 4122 compliant Universally Unique IDentifiers (UUIDs). This library supports both version 4 UUIDs (UUIDs from random numbers) and version 1 UUIDs (time-based UUIDs), and provides an object-oriented interface to print a generated or parsed UUID in a variety of forms.
34+
UUID.js is a JavaScript/ECMAScript library to generate RFC 4122 compliant
35+
Universally Unique IDentifiers (UUIDs). This library supports both version 4
36+
UUIDs (UUIDs from random numbers) and version 1 UUIDs (time-based UUIDs), and
37+
provides an object-oriented interface to print a generated or parsed UUID in a
38+
variety of forms.
3439

35-
# FEATURES
40+
## Features
3641

37-
* Generates version 4 UUIDs (UUIDs from random numbers) and version 1 UUIDs (time-based UUIDs)
38-
* Provides an object-oriented interface to print various string representations of a generated or parsed UUID
39-
* Utilizes a cryptographically secure pseudo-random number generator if available, whereas falling back to `Math.random()` otherwise
40-
* Appends extra random bits to compensate for the lower timestamp resolution of JavaScript than that required for version 1 UUIDs
41-
* Comes with a lot of test cases including format checks and statistical tests to maintain a high-quality code base
42-
* Supports old browsers as well as modern browser and server environments, as kept compatible with ECMAScript 3rd edition
42+
- Generates version 4 UUIDs (UUIDs from random numbers) and version 1 UUIDs
43+
(time-based UUIDs)
44+
- Provides an object-oriented interface to print various string representations
45+
of a generated or parsed UUID
46+
- Utilizes a cryptographically secure pseudo-random number generator if
47+
available, whereas falling back to `Math.random()` otherwise
48+
- Appends extra random bits to compensate for the lower timestamp resolution of
49+
JavaScript than that required for version 1 UUIDs
50+
- Comes with a lot of test cases including format checks and statistical tests
51+
to maintain a high-quality code base
52+
- Supports old browsers as well as modern browser and server environments, as
53+
kept compatible with ECMAScript 3rd edition
4354

44-
# INSTALL
55+
## Install
4556

4657
Download `src/uuid.js` or call `npm install uuidjs`.
4758

@@ -57,7 +68,7 @@ Or, import `uuidjs`.
5768
const UUID = require("uuidjs");
5869
```
5970

60-
# USAGE EXAMPLES
71+
## Usage Examples
6172

6273
`UUID.generate()` returns a version 4 UUID as a hexadecimal string.
6374

@@ -66,7 +77,8 @@ const UUID = require("uuidjs");
6677
console.log(UUID.generate()); // fa84cf42-ffdf-4975-b42b-31ab5fb983eb
6778
```
6879

69-
`UUID.genV4()`, `UUID.genV1()`, and `UUID.parse()` return a UUID object that has various fields and methods.
80+
`UUID.genV4()`, `UUID.genV1()`, and `UUID.parse()` return a UUID object that has
81+
various fields and methods.
7082

7183
```javascript
7284
// Create a version 4 (random number-based) UUID object
@@ -108,7 +120,8 @@ console.log(uuid.bitFields[4]); // "11011001"
108120
console.log(uuid.hexFields[5]); // "95795a3bcd40"
109121
```
110122

111-
UUID.js supports the so-called noConflict mode to work around namespace conflicts.
123+
UUID.js supports the so-called noConflict mode to work around namespace
124+
conflicts.
112125

113126
```javascript
114127
// Avoid namespace conflicts with other libraries
@@ -117,30 +130,29 @@ UUID = UUID.overwrittenUUID; // Restore the original value
117130
console.log(arbitraryVarName.generate()); // "cb9a0283-a44c-4e7a-a5b0-9cd2876e952b"
118131
```
119132

120-
# LICENSE
133+
## License
121134

122-
Copyright (c) 2010-2021 LiosK
135+
Copyright (c) 2010-2022 LiosK
123136

124-
Licensed under the Apache License, Version 2.0 (the "License");
125-
you may not use this file except in compliance with the License.
126-
You may obtain a copy of the License at
137+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
138+
this file except in compliance with the License. You may obtain a copy of the
139+
License at
127140

128141
http://www.apache.org/licenses/LICENSE-2.0
129142

130-
Unless required by applicable law or agreed to in writing, software
131-
distributed under the License is distributed on an "AS IS" BASIS,
132-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
133-
See the License for the specific language governing permissions and
134-
limitations under the License.
143+
Unless required by applicable law or agreed to in writing, software distributed
144+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
145+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
146+
specific language governing permissions and limitations under the License.
135147

136-
# AUTHOR
148+
## Author
137149

138150
139151

140-
# SEE ALSO
152+
## See Also
141153

142-
* [RFC 4122](https://www.ietf.org/rfc/rfc4122.txt)
143-
* [GitHub Repository](https://github.com/LiosK/UUID.js)
144-
* [npm Package](https://www.npmjs.com/package/uuidjs)
145-
* [API Documentation](https://liosk.github.io/UUID.js/docs/)
146-
* [Run test cases on your browser](https://liosk.github.io/UUID.js/test/browser.html)
154+
- [RFC 4122](https://www.ietf.org/rfc/rfc4122.txt)
155+
- [GitHub Repository](https://github.com/LiosK/UUID.js)
156+
- [npm Package](https://www.npmjs.com/package/uuidjs)
157+
- [API Documentation](https://liosk.github.io/UUID.js/docs/)
158+
- [Run test cases on your browser](https://liosk.github.io/UUID.js/test/browser.html)

docs/UUID.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1989,7 +1989,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="UUID.html
19891989
<br class="clear">
19901990

19911991
<footer>
1992-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Sun Aug 29 2021 10:42:34 GMT+0900 (Japan Standard Time)
1992+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Sun Feb 06 2022 21:50:30 GMT+0900 (Japan Standard Time)
19931993
</footer>
19941994

19951995
<script> prettyPrint(); </script>

docs/index.html

Lines changed: 44 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ <h3> </h3>
4343

4444

4545
<section>
46-
<article><h1>NAME</h1>
47-
<p>UUID.js - RFC-compliant UUID Generator for JavaScript</p>
48-
<h1>SYNOPSIS</h1>
46+
<article><h1>UUID.js - RFC-compliant UUID Generator for JavaScript</h1>
47+
<p><a href="https://www.npmjs.com/package/uuidjs"><img src="https://img.shields.io/npm/v/uuidjs" alt="npm"></a>
48+
<a href="https://github.com/LiosK/UUID.js/blob/master/LICENSE.txt"><img src="https://img.shields.io/npm/l/uuidjs" alt="License"></a></p>
49+
<h2>Synopsis</h2>
4950
<pre class="prettyprint source lang-html"><code>&lt;!-- HTML5 -->
5051
&lt;script src=&quot;src/uuid.js&quot;>&lt;/script>
5152
&lt;script> var uuid = UUID.generate(); &lt;/script>
@@ -55,38 +56,49 @@ <h1>SYNOPSIS</h1>
5556
let uuid = UUID.generate();
5657
</code></pre>
5758
<pre class="prettyprint source lang-typescript"><code>// TypeScript
58-
import UUID from 'uuidjs';
59+
import UUID from &quot;uuidjs&quot;;
5960
let str: string = UUID.generate();
6061
let obj: UUID = UUID.genV4();
6162
</code></pre>
6263
<pre class="prettyprint source lang-bash"><code># Command-line
6364
npx uuidjs
6465
</code></pre>
65-
<h1>DESCRIPTION</h1>
66-
<p>UUID.js is a JavaScript/ECMAScript library to generate RFC 4122 compliant Universally Unique IDentifiers (UUIDs). This library supports both version 4 UUIDs (UUIDs from random numbers) and version 1 UUIDs (time-based UUIDs), and provides an object-oriented interface to print a generated or parsed UUID in a variety of forms.</p>
67-
<h1>FEATURES</h1>
66+
<h2>Description</h2>
67+
<p>UUID.js is a JavaScript/ECMAScript library to generate RFC 4122 compliant
68+
Universally Unique IDentifiers (UUIDs). This library supports both version 4
69+
UUIDs (UUIDs from random numbers) and version 1 UUIDs (time-based UUIDs), and
70+
provides an object-oriented interface to print a generated or parsed UUID in a
71+
variety of forms.</p>
72+
<h2>Features</h2>
6873
<ul>
69-
<li>Generates version 4 UUIDs (UUIDs from random numbers) and version 1 UUIDs (time-based UUIDs)</li>
70-
<li>Provides an object-oriented interface to print various string representations of a generated or parsed UUID</li>
71-
<li>Utilizes a cryptographically secure pseudo-random number generator if available, whereas falling back to <code>Math.random()</code> otherwise</li>
72-
<li>Appends extra random bits to compensate for the lower timestamp resolution of JavaScript than that required for version 1 UUIDs</li>
73-
<li>Comes with a lot of test cases including format checks and statistical tests to maintain a high-quality code base</li>
74-
<li>Supports old browsers as well as modern browser and server environments, as kept compatible with ECMAScript 3rd edition</li>
74+
<li>Generates version 4 UUIDs (UUIDs from random numbers) and version 1 UUIDs
75+
(time-based UUIDs)</li>
76+
<li>Provides an object-oriented interface to print various string representations
77+
of a generated or parsed UUID</li>
78+
<li>Utilizes a cryptographically secure pseudo-random number generator if
79+
available, whereas falling back to <code>Math.random()</code> otherwise</li>
80+
<li>Appends extra random bits to compensate for the lower timestamp resolution of
81+
JavaScript than that required for version 1 UUIDs</li>
82+
<li>Comes with a lot of test cases including format checks and statistical tests
83+
to maintain a high-quality code base</li>
84+
<li>Supports old browsers as well as modern browser and server environments, as
85+
kept compatible with ECMAScript 3rd edition</li>
7586
</ul>
76-
<h1>INSTALL</h1>
87+
<h2>Install</h2>
7788
<p>Download <code>src/uuid.js</code> or call <code>npm install uuidjs</code>.</p>
7889
<p>Then, load <code>src/uuid.js</code>.</p>
7990
<pre class="prettyprint source lang-html"><code>&lt;script src=&quot;src/uuid.js&quot;>&lt;/script>
8091
</code></pre>
8192
<p>Or, import <code>uuidjs</code>.</p>
8293
<pre class="prettyprint source lang-javascript"><code>const UUID = require(&quot;uuidjs&quot;);
8394
</code></pre>
84-
<h1>USAGE EXAMPLES</h1>
95+
<h2>Usage Examples</h2>
8596
<p><code>UUID.generate()</code> returns a version 4 UUID as a hexadecimal string.</p>
8697
<pre class="prettyprint source lang-javascript"><code>// Create a version 4 UUID as a hexadecimal string
8798
console.log(UUID.generate()); // fa84cf42-ffdf-4975-b42b-31ab5fb983eb
8899
</code></pre>
89-
<p><code>UUID.genV4()</code>, <code>UUID.genV1()</code>, and <code>UUID.parse()</code> return a UUID object that has various fields and methods.</p>
100+
<p><code>UUID.genV4()</code>, <code>UUID.genV1()</code>, and <code>UUID.parse()</code> return a UUID object that has
101+
various fields and methods.</p>
90102
<pre class="prettyprint source lang-javascript"><code>// Create a version 4 (random number-based) UUID object
91103
var objV4 = UUID.genV4();
92104

@@ -125,26 +137,26 @@ <h1>USAGE EXAMPLES</h1>
125137
console.log(uuid.bitFields[4]); // &quot;11011001&quot;
126138
console.log(uuid.hexFields[5]); // &quot;95795a3bcd40&quot;
127139
</code></pre>
128-
<p>UUID.js supports the so-called noConflict mode to work around namespace conflicts.</p>
140+
<p>UUID.js supports the so-called noConflict mode to work around namespace
141+
conflicts.</p>
129142
<pre class="prettyprint source lang-javascript"><code>// Avoid namespace conflicts with other libraries
130143
var arbitraryVarName = UUID;
131144
UUID = UUID.overwrittenUUID; // Restore the original value
132145
console.log(arbitraryVarName.generate()); // &quot;cb9a0283-a44c-4e7a-a5b0-9cd2876e952b&quot;
133146
</code></pre>
134-
<h1>LICENSE</h1>
135-
<p>Copyright (c) 2010-2021 LiosK</p>
136-
<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
137-
you may not use this file except in compliance with the License.
138-
You may obtain a copy of the License at</p>
147+
<h2>License</h2>
148+
<p>Copyright (c) 2010-2022 LiosK</p>
149+
<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use
150+
this file except in compliance with the License. You may obtain a copy of the
151+
License at</p>
139152
<p>http://www.apache.org/licenses/LICENSE-2.0</p>
140-
<p>Unless required by applicable law or agreed to in writing, software
141-
distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
142-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
143-
See the License for the specific language governing permissions and
144-
limitations under the License.</p>
145-
<h1>AUTHOR</h1>
153+
<p>Unless required by applicable law or agreed to in writing, software distributed
154+
under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR
155+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
156+
specific language governing permissions and limitations under the License.</p>
157+
<h2>Author</h2>
146158
<p>LiosK <a href="mailto:[email protected]">[email protected]</a></p>
147-
<h1>SEE ALSO</h1>
159+
<h2>See Also</h2>
148160
<ul>
149161
<li><a href="https://www.ietf.org/rfc/rfc4122.txt">RFC 4122</a></li>
150162
<li><a href="https://github.com/LiosK/UUID.js">GitHub Repository</a></li>
@@ -185,7 +197,7 @@ <h2>uuid.js</h2>
185197

186198

187199
<dt class="tag-version">Version:</dt>
188-
<dd class="tag-version"><ul class="dummy"><li>v4.2.9</li></ul></dd>
200+
<dd class="tag-version"><ul class="dummy"><li>v4.2.10</li></ul></dd>
189201

190202

191203

@@ -215,7 +227,7 @@ <h2>uuid.js</h2>
215227

216228

217229
<dt class="tag-license">License:</dt>
218-
<dd class="tag-license"><ul class="dummy"><li>Apache License 2.0: Copyright (c) 2010-2021 LiosK</li></ul></dd>
230+
<dd class="tag-license"><ul class="dummy"><li>Apache License 2.0: Copyright (c) 2010-2022 LiosK</li></ul></dd>
219231

220232

221233

@@ -274,7 +286,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="UUID.html
274286
<br class="clear">
275287

276288
<footer>
277-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Sun Aug 29 2021 10:42:34 GMT+0900 (Japan Standard Time)
289+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Sun Feb 06 2022 21:50:30 GMT+0900 (Japan Standard Time)
278290
</footer>
279291

280292
<script> prettyPrint(); </script>

docs/uuid.js.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ <h1 class="page-title">Source: uuid.js</h1>
3131
*
3232
* @file
3333
* @author LiosK
34-
* @version v4.2.9
35-
* @license Apache License 2.0: Copyright (c) 2010-2021 LiosK
34+
* @version v4.2.10
35+
* @license Apache License 2.0: Copyright (c) 2010-2022 LiosK
3636
*/
3737

3838
/**
@@ -419,7 +419,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="UUID.html
419419
<br class="clear">
420420

421421
<footer>
422-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Sun Aug 29 2021 10:42:34 GMT+0900 (Japan Standard Time)
422+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Sun Feb 06 2022 21:50:30 GMT+0900 (Japan Standard Time)
423423
</footer>
424424

425425
<script> prettyPrint(); </script>

0 commit comments

Comments
 (0)