Commit 0806d1aa by jaymehta

.

1 parent d304ac11
...@@ -88,11 +88,11 @@ module.exports = createCoreController("api::vendor.vendor", () => ({ ...@@ -88,11 +88,11 @@ module.exports = createCoreController("api::vendor.vendor", () => ({
// console.log() // console.log()
let newStr = str.replace(/ /g,'').toUpperCase().replace(/[^a-zA-Z ]/g, "") let newStr = str.replace(/ /g,'').toUpperCase().replace(/[^a-zA-Z ]/g, "")
if (newStr.length >= 4) { if (newStr.length >= 4) {
final = newStr.slice(0, 4); final = newStr.slice(0, 4)+String(Math.floor(Math.random() * 90000) + 10000);
console.log(final+String(Math.floor(Math.random() * 90000) + 10000)) // console.log(final+String(Math.floor(Math.random() * 90000) + 10000))
} else { } else {1
final = newStr final = newStr.slice(0, 4)+String(Math.floor(Math.random() * 90000) + 10000)
console.log(final+String(Math.floor(Math.random() * 90000) + 10000)) // console.log(final+String(Math.floor(Math.random() * 90000) + 10000))
} }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!