mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 18:50:56 +02:00
Added hacknet node api functions for spending hashes. Fixed several bugs with v0.46.0. Rebalanced hash upgrades. continued working on terminal directory implementation
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// Function that generates a random gibberish string of length n
|
||||
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
|
||||
export function createRandomString(n: number): string {
|
||||
let str: string = "";
|
||||
|
||||
for (let i = 0; i < n; ++i) {
|
||||
str += chars.charAt(Math.floor(Math.random() * chars.length));
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
Reference in New Issue
Block a user