TkID is an easy way to generate tokens or IDs.
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/tkid/index.js"></script>
</head>
<body>
<script>
// generate a random token
const token = tk();
</script>
</body>
</html>
Install:
npm i tkid
Use:
const tk = require('tkid');
// generate a random token
const token = tk();