Travis build: 468

This commit is contained in:
Travis CI
2017-12-29 08:15:12 +00:00
parent 70e7308634
commit 00e595cff0
3 changed files with 79 additions and 39 deletions

View File

@ -100,6 +100,7 @@
* [`setStyle`](#setstyle)
* [`show`](#show)
* [`toggleClass`](#toggleclass)
* [`UUIDGeneratorBrowser`](#uuidgeneratorbrowser)
</details>
@ -189,6 +190,7 @@
* [`JSONToFile`](#jsontofile)
* [`readFileLines`](#readfilelines)
* [`UUIDGeneratorNode`](#uuidgeneratornode)
</details>
@ -251,7 +253,6 @@
* [`timeTaken`](#timetaken)
* [`toDecimalMark`](#todecimalmark)
* [`toOrdinalSuffix`](#toordinalsuffix)
* [`UUIDGenerator`](#uuidgenerator)
* [`validateNumber`](#validatenumber)
</details>
@ -1979,6 +1980,32 @@ toggleClass(document.querySelector('p.special'), 'special'); // The paragraph wi
</details>
[⬆ Back to top](#table-of-contents)
### UUIDGeneratorBrowser
Generates a UUID in a browser.
Use `crypto` API to generate a UUID, compliant with [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) version 4.
```js
const UUIDGeneratorBrowser = () =>
([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>
(c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)
);
```
<details>
<summary>Examples</summary>
```js
UUIDGeneratorBrowser(); // '7982fcfe-5721-4632-bede-6000885be57d'
```
</details>
[⬆ Back to top](#table-of-contents)
## Date
@ -3083,6 +3110,33 @@ console.log(arr); // ['line1', 'line2', 'line3']
</details>
[⬆ Back to top](#table-of-contents)
### UUIDGeneratorNode
Generates a UUID in Node.JS.
Use `crypto` API to generate a UUID, compliant with [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) version 4.
```js
const crypto = require('crypto');
const UUIDGeneratorNode = () =>
([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>
(c ^ (crypto.randomBytes(1)[0] & (15 >> (c / 4)))).toString(16)
);
```
<details>
<summary>Examples</summary>
```js
UUIDGeneratorNode(); // '79c7c136-60ee-40a2-beb2-856f1feabefc'
```
</details>
[⬆ Back to top](#table-of-contents)
## Object
@ -4130,32 +4184,6 @@ toOrdinalSuffix('123'); // "123rd"
[⬆ Back to top](#table-of-contents)
### UUIDGenerator
Generates a UUID.
Use `crypto` API to generate a UUID, compliant with [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) version 4.
```js
const UUIDGenerator = () =>
([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>
(c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)
);
```
<details>
<summary>Examples</summary>
```js
UUIDGenerator(); // '7982fcfe-5721-4632-bede-6000885be57d'
```
</details>
[⬆ Back to top](#table-of-contents)
### validateNumber
Returns `true` if the given value is a number, `false` otherwise.