library random string to simplify generate unique string
const { randomString } = require('expresso-core')
import { randomString } from 'expresso-core'
Random String generate by default length 32
import { randomString } from 'expresso-core'
const result = randomString.generate() // by default length 32
console.log(result)
// output :
'aq52PvnFrtvsX6rtA8MLj27xR2HcEJht'
const result = randomString.generate(10)
console.log(result)
// output :
'aq52PvnFrt'
Generate with type Numeric
const result = randomString.generate({
type: 'numeric',
length: 5,
})
console.log(result)
// output :
'72810'