From c08892459a3eb2238f8ea60ea5d8aadeb2ce3f07 Mon Sep 17 00:00:00 2001 From: Isabelle Viktoria Maciohsek Date: Sun, 30 Jan 2022 18:22:35 +0200 Subject: [PATCH] Update formatting --- snippets/RGBToHex.md | 4 ++-- snippets/UUIDGeneratorBrowser.md | 2 +- snippets/UUIDGeneratorNode.md | 2 +- snippets/copyToClipboard.md | 2 +- snippets/hammingDistance.md | 4 ++-- snippets/hashBrowser.md | 2 +- snippets/randomAlphaNumeric.md | 5 +++-- snippets/randomHexColorCode.md | 2 +- 8 files changed, 12 insertions(+), 11 deletions(-) diff --git a/snippets/RGBToHex.md b/snippets/RGBToHex.md index 84360a533..4eeb174e5 100644 --- a/snippets/RGBToHex.md +++ b/snippets/RGBToHex.md @@ -7,8 +7,8 @@ lastUpdated: 2020-11-03T22:11:18+02:00 Converts the values of RGB components to a hexadecimal color code. -- Convert given RGB parameters to hexadecimal string using bitwise left-shift operator (`<<`) and `Number.prototype.toString(16)`. -- Use `String.prototype.padStart(6, '0')` to get a 6-digit hexadecimal value. +- Convert given RGB parameters to hexadecimal string using bitwise left-shift operator (`<<`) and `Number.prototype.toString()`. +- Use `String.prototype.padStart()` to get a 6-digit hexadecimal value. ```js const RGBToHex = (r, g, b) => diff --git a/snippets/UUIDGeneratorBrowser.md b/snippets/UUIDGeneratorBrowser.md index 1079863f4..c46cdcbe9 100644 --- a/snippets/UUIDGeneratorBrowser.md +++ b/snippets/UUIDGeneratorBrowser.md @@ -8,7 +8,7 @@ lastUpdated: 2020-10-22T20:24:44+03:00 Generates a UUID in a browser. - Use `Crypto.getRandomValues()` to generate a UUID, compliant with [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) version 4. -- Use `Number.prototype.toString(16)` to convert it to a proper UUID. +- Use `Number.prototype.toString()` to convert it to a proper UUID (hexadecimal string). ```js const UUIDGeneratorBrowser = () => diff --git a/snippets/UUIDGeneratorNode.md b/snippets/UUIDGeneratorNode.md index a796ad6b8..e023f26ec 100644 --- a/snippets/UUIDGeneratorNode.md +++ b/snippets/UUIDGeneratorNode.md @@ -8,7 +8,7 @@ lastUpdated: 2020-10-22T20:24:44+03:00 Generates a UUID in Node.JS. - Use `crypto.randomBytes()` to generate a UUID, compliant with [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) version 4. -- Use `Number.prototype.toString(16)` to convert it to a proper UUID. +- Use `Number.prototype.toString()` to convert it to a proper UUID (hexadecimal string). ```js const crypto = require('crypto'); diff --git a/snippets/copyToClipboard.md b/snippets/copyToClipboard.md index c15de9884..9f6cc8d48 100644 --- a/snippets/copyToClipboard.md +++ b/snippets/copyToClipboard.md @@ -10,7 +10,7 @@ Only works as a result of user action (i.e. inside a `click` event listener). - Create a new `