UNPKG

@wireapp/api-client

Version:

Wire API Client to send and receive data.

9 lines (8 loc) 423 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.unsafeAlphanumeric = function (length) { if (length === void 0) { length = 32; } var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; var range = Array.from(Array(length).keys()); return range.reduce(function (acc, index) { return acc + chars[Math.floor(Math.random() * chars.length)]; }, ''); };