Created
August 16, 2019 13:07
-
-
Save Keldrik/abc2ef03f1b373fc4357147abdb16ae5 to your computer and use it in GitHub Desktop.
Helper module for creating random strings with letters and numbers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const randomString = (length) => { | |
return [...Array(length)].map(() => Math.random().toString(36)[2]).join(''); | |
} | |
export default randomString; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment