aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data/sandbox/string-util.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2022-05-20 10:28:38 -0400
committerGitHub <noreply@github.com>2022-05-20 10:28:38 -0400
commit31e20c889e467aa4ba64b0b5baf602adc1359371 (patch)
treea033db935a817b2d407ec20843176610a87a6e16 /ext/js/data/sandbox/string-util.js
parentae0ad227c0fd293609a21e5cc1d2a4b85fe7c520 (diff)
ESlint JSdoc (#2148)
* Install eslint-plugin-jsdoc * Initial rules setup * Update lists * Use @returns rather than @return * Remove error throwing code which is never executed * Fix issues relating to @throws * General error fixes * Update Display type documentation * Various doc fixes * Fix invalid tuple syntax * Doc updates * Remove unused * Doc updates * Enable jsdoc/require-returns * Update rules * Update remaining rules
Diffstat (limited to 'ext/js/data/sandbox/string-util.js')
-rw-r--r--ext/js/data/sandbox/string-util.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/js/data/sandbox/string-util.js b/ext/js/data/sandbox/string-util.js
index 5c395be7..de6933cd 100644
--- a/ext/js/data/sandbox/string-util.js
+++ b/ext/js/data/sandbox/string-util.js
@@ -21,8 +21,8 @@
class StringUtil {
/**
* Decodes the contents of an ArrayBuffer using UTF8.
- * @param arrayBuffer The input ArrayBuffer.
- * @returns A UTF8-decoded string.
+ * @param {ArrayBuffer} arrayBuffer The input ArrayBuffer.
+ * @returns {string} A UTF8-decoded string.
*/
static arrayBufferUtf8Decode(arrayBuffer) {
try {
@@ -34,8 +34,8 @@ class StringUtil {
/**
* Converts the contents of an ArrayBuffer to a base64 string.
- * @param arrayBuffer The input ArrayBuffer.
- * @returns A base64 string representing the binary content.
+ * @param {ArrayBuffer} arrayBuffer The input ArrayBuffer.
+ * @returns {string} A base64 string representing the binary content.
*/
static arrayBufferToBase64(arrayBuffer) {
return btoa(this.arrayBufferToBinaryString(arrayBuffer));
@@ -43,8 +43,8 @@ class StringUtil {
/**
* Converts the contents of an ArrayBuffer to a binary string.
- * @param arrayBuffer The input ArrayBuffer.
- * @returns A string representing the binary content.
+ * @param {ArrayBuffer} arrayBuffer The input ArrayBuffer.
+ * @returns {string} A string representing the binary content.
*/
static arrayBufferToBinaryString(arrayBuffer) {
const bytes = new Uint8Array(arrayBuffer);
@@ -61,8 +61,8 @@ class StringUtil {
/**
* Converts a base64 string to an ArrayBuffer.
- * @param content The binary content string encoded in base64.
- * @returns A new `ArrayBuffer` object corresponding to the specified content.
+ * @param {string} content The binary content string encoded in base64.
+ * @returns {ArrayBuffer} A new `ArrayBuffer` object corresponding to the specified content.
*/
static base64ToArrayBuffer(content) {
const binaryContent = atob(content);