static generateId()

in lib/utils.js [93:101]


  static generateId(prefix, length = 21) {
    // base58; non-repeating chars
    const chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
    const str = Array(length - prefix.length)
      .fill(0)
      .map((_) => chars[Math.floor(Math.random() * chars.length)])
      .join('');
    return `${prefix}${str}`;
  }