Last active
June 6, 2023 20:03
-
-
Save oneeyedman/84c805d7f6cb51a3aa13745eb4fd6559 to your computer and use it in GitHub Desktop.
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
function getEthicID(divider = '/', prefix = '') { | |
const timestamp = new Date().toISOString().replace(/[^0-9]/g, ''); | |
const randomChars = Math.random().toString(36).substring(2, 8).replace(' ', '_').toUpperCase(); | |
return prefix + timestamp + divider + randomChars; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment