UNPKG

ws2801-client

Version:

A client for the webserver for the WS2801-Pi module.

14 lines (13 loc) 480 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.generateId = void 0; function generateId(idLength) { let result = ''; const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; const charactersLength = characters.length; for (let i = 0; i < idLength; i++) { result += characters.charAt(Math.floor(Math.random() * charactersLength)); } return result; } exports.generateId = generateId;