From 0fd2550190c130559b478c2396d49a15157cac72 Mon Sep 17 00:00:00 2001 From: toby Date: Thu, 9 Feb 2017 13:37:30 -0500 Subject: [PATCH] Improve and fix examples for padBytesRight --- src/js/core/Utils.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/js/core/Utils.js b/src/js/core/Utils.js index 9812ab2..96692e7 100755 --- a/src/js/core/Utils.js +++ b/src/js/core/Utils.js @@ -104,11 +104,17 @@ var Utils = { * @returns {byteArray} * * @example - * // returns "['a', 0, 0, 0]" + * // returns ["a", 0, 0, 0] * Utils.padBytesRight("a", 4); * - * // returns "['a', 1, 1, 1]" + * // returns ["a", 1, 1, 1] * Utils.padBytesRight("a", 4, 1); + * + * // returns ["t", "e", "s", "t", 0, 0, 0, 0] + * Utils.padBytesRight("test", 8); + * + * // returns ["t", "e", "s", "t", 1, 1, 1, 1] + * Utils.padBytesRight("test", 8, 1); */ padBytesRight: function(arr, numBytes, padByte) { padByte = padByte || 0;