Created
February 21, 2022 16:34
-
-
Save julienreszka/c6c42acca86239f136031e8f681ec4b7 to your computer and use it in GitHub Desktop.
Useful for creating Google-like Payments profile ID
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
var getRandom4 = () => String(Math.round(Math.random(1000,9999) * 100000)).slice(0,4) | |
var get3Random4SeparatedByDashes = () => [getRandom4(),getRandom4(),getRandom4()].join('-') | |
get3Random4SeparatedByDashes() | |
// '1610-6631-6374' // for example |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment