bitburner-src/utils/ObjectHelperFunctions.js

10 lines
213 B
JavaScript

//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;
}