@talkjs/react-native
Version:
Official TalkJS SDK for React Native
11 lines (10 loc) • 312 B
JavaScript
;
const VALID_CHARS = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
export function getRandomWord(length) {
let word = '';
for (let i = 0; i < length; ++i) {
word += VALID_CHARS[Math.floor(Math.random() * VALID_CHARS.length)];
}
return word;
}
//# sourceMappingURL=utils.js.map