UNPKG

@rarible/utils

Version:
4 lines (3 loc) 169 B
export function getRandomId(prefix) { return (prefix ? prefix + "-" : "") + Date.now().toString(36) + "-" + ((Math.random() + 1) * Math.pow(10, 16)).toString(36); }