Replies: 1 comment
-
You can use Code by Zapier to generate a custom function key() {
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
const segments = 6
const segmentLength = 4
let licenseKey = []
for (let i = 0; i < segments; i++) {
let segment = ''
for (let j = 0; j < segmentLength; j++) {
const randomIndex = Math.floor(Math.random() * characters.length)
segment += characters[randomIndex]
}
licenseKey.push(segment)
}
return licenseKey.join('-')
}
console.log(key()) // => "ABCD-EFGH-IJKL-MNOP-QRST-UVWX" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Need a walkthrough for generate desktop app license key in this ABCD-EFGH-IJKL-MNOP-QRST-UVWX kinda format using Stripe and Zapier.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions