Bin
2025-12-17 8c7632e4a973d7e005f6b070a7627205d869a344
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { nanoid } from "nanoid";
 
/**
 * Unique hash generator
 * @param {number} lgth
 */
export function guidGenerator(lgth) {
  let uniqueID = nanoid(10);
 
  if (lgth) {
    uniqueID = nanoid(lgth);
  }
 
  return uniqueID;
}