forked from geolba/tethys.backend
8 lines
153 B
JavaScript
8 lines
153 B
JavaScript
|
const GenRandomId = (length) => {
|
||
|
return Math.random()
|
||
|
.toString(36)
|
||
|
.replace(/[^a-z]+/g, '')
|
||
|
.slice(0, length || 5)
|
||
|
}
|
||
|
|
||
|
export default GenRandomId
|