Commit 0806d1aa by jaymehta

.

1 parent d304ac11
......@@ -88,11 +88,11 @@ module.exports = createCoreController("api::vendor.vendor", () => ({
// console.log()
let newStr = str.replace(/ /g,'').toUpperCase().replace(/[^a-zA-Z ]/g, "")
if (newStr.length >= 4) {
final = newStr.slice(0, 4);
console.log(final+String(Math.floor(Math.random() * 90000) + 10000))
} else {
final = newStr
console.log(final+String(Math.floor(Math.random() * 90000) + 10000))
final = newStr.slice(0, 4)+String(Math.floor(Math.random() * 90000) + 10000);
// console.log(final+String(Math.floor(Math.random() * 90000) + 10000))
} else {1
final = newStr.slice(0, 4)+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!