mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 01:33:54 +01:00
Companies save/loading properly. Added a utility file for Objects. Started work on Active Scripts info page. Adjusted leveling formula. Tested/fixed scripts running that have errors, seems to work fine might need proper testing later
This commit is contained in:
parent
5f1b58fd86
commit
d88237fa91
10
utils/ObjectHelperFunctions.js
Normal file
10
utils/ObjectHelperFunctions.js
Normal file
@ -0,0 +1,10 @@
|
||||
//Netburner Object helper functions
|
||||
|
||||
//Returns the size (number of keys) of an object
|
||||
function sizeOfObject(obj) {
|
||||
var size = 0, key;
|
||||
for (key in obj) {
|
||||
if (obj.hasOwnProperty(key)) size++;
|
||||
}
|
||||
return size;
|
||||
}
|
Loading…
Reference in New Issue
Block a user