typescript on both client and server with communication via socket.io
This commit is contained in:
8
tools/simpleID.ts
Normal file
8
tools/simpleID.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { customAlphabet } from 'nanoid';
|
||||
|
||||
const alphabet =
|
||||
'0123456789abcdefghijklmnopqrstuvwxyz';
|
||||
|
||||
const generateID = (length: number = 6) => customAlphabet(alphabet, length);
|
||||
|
||||
export default generateID;
|
||||
Reference in New Issue
Block a user