Experiment to rebuild Diffuse using web applets.
0

Configure Feed

Select the types of activity you want to include in your feed.

1export function arrayShuffle<T>(array: Array<T>): Array<T> { 2 if (array.length === 0) { 3 return []; 4 } 5 6 array = [...array]; 7 8 for (let index = array.length - 1; index > 0; index--) { 9 const randArr = crypto.getRandomValues(new Uint32Array(1)); 10 const randVal = randArr[0] / 2 ** 32; 11 const newIndex = Math.floor(randVal * (index + 1)); 12 [array[index], array[newIndex]] = [array[newIndex], array[index]]; 13 } 14 15 return array; 16}