Skip to content

Commit c071702

Browse files
refringechompDev
andauthored
Better Random (#972)
This started as a small update. This pull request includes updates to the `RandomUtil` class to improve the security and accuracy of random number generation by utilizing the `node:crypto` module. Additionally, it enhances the documentation and refactors several methods for clarity and performance. Includes tests, both before and after the changes. The only *possible* breaking change is that now the `getKey`, `getKeyValue`, and `drawRandomFromDict` methods are typed with generics instead of `any`. I tried to keep them as *generic* as possible, but we should probably include this in a BE to ensure it doesn't break anything. No further changes are planned--Saved as a draft because it's late and I still want to review. --------- Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
1 parent 9ef8206 commit c071702

File tree

3 files changed

+858
-65
lines changed

3 files changed

+858
-65
lines changed

project/biome.jsonc

+13-1
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,17 @@
6969
"formatter": {
7070
"trailingCommas": "none"
7171
}
72-
}
72+
},
73+
"overrides": [
74+
{
75+
"include": ["tests/*"],
76+
"linter": {
77+
"rules": {
78+
"suspicious": {
79+
"noExplicitAny": "off"
80+
}
81+
}
82+
}
83+
}
84+
]
7385
}

0 commit comments

Comments
 (0)