MCPcopy Create free account
hub / github.com/dailydotdev/apps / randomAlnum

Function randomAlnum

packages/playwright/tests/tracking.setup.ts:14–27  ·  view source on GitHub ↗
(length: number)

Source from the content-addressed store, hash-verified

12 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
13
14const randomAlnum = (length: number): string => {
15 let out = '';
16 while (out.length < length) {
17 for (const byte of randomBytes(length * 2)) {
18 if (byte < 248) {
19 out += ALNUM[byte % 62];
20 }
21 if (out.length === length) {
22 break;
23 }
24 }
25 }
26 return out;
27};
28
29setup('seed da2 tracking cookie', async ({ context, baseURL }) => {
30 if (!baseURL) {

Callers 1

tracking.setup.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected