From 966e5c04d1159e6efb38ff5d36ef97e2999b7aea Mon Sep 17 00:00:00 2001 From: Migue Date: Sun, 9 Aug 2020 10:22:02 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20Added=20=C3=B1=20character?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added ñ character (#18) Because there are people who wants spanish random strings xD --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index ec95697..2c53370 100644 --- a/src/utils.js +++ b/src/utils.js @@ -80,7 +80,7 @@ class Utils { * @static */ static getRandomString(length) { - const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + const chars = 'ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz0123456789'; return (new Array(length)) .fill('') .reduce((acc) => acc + chars.charAt(Math.floor(Math.random() * chars.length)), '');