Skip to content

Commit

Permalink
fix: Added ñ character
Browse files Browse the repository at this point in the history
Added ñ character (#18)

Because there are people who wants spanish random strings xD
  • Loading branch information
elmiguedev authored Aug 9, 2020
1 parent 66e549f commit 966e5c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)), '');
Expand Down

0 comments on commit 966e5c0

Please sign in to comment.