You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

11 lines
218 B

'use strict';
module.exports = function count() {
var arrayLength = 0;
if (Array.isArray(this.items)) {
arrayLength = this.items.length;
}
return Math.max(Object.keys(this.items).length, arrayLength);
};