mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 20:25:45 +01:00
10 lines
213 B
JavaScript
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;
|
|
} |