lbry-desktop/ui/util/generate-thumbnail-name.js

8 lines
273 B
JavaScript
Raw Permalink Normal View History

// @flow
export const generateThumbnailName = (): string => {
let text = '';
const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
for (let i = 0; i < 24; i += 1) text += possible.charAt(Math.floor(Math.random() * 62));
return text;
};