We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0be46a commit 0cac120Copy full SHA for 0cac120
apps/site/components/Common/Partners/utils.ts
@@ -1,4 +1,4 @@
1
-import crypto from 'node:crypto';
+import { createHash } from 'node:crypto';
2
3
import type {
4
RandomPartnerListConfig,
@@ -8,7 +8,7 @@ import type {
8
// Fisher-Yates shuffle algorithm with a seed for deterministic results
9
function shuffle(array: Array<Partners>, seed: number): Array<Partners> {
10
const shuffled = [...array];
11
- const hash = crypto.createHash('sha256').update(String(seed)).digest();
+ const hash = createHash('sha256').update(String(seed)).digest();
12
13
for (let i = shuffled.length - 1; i > 0; i--) {
14
// Use hash bytes to generate deterministic "random" index
0 commit comments