my-idlers/node_modules/collect.js/dist/methods/isEmpty.js

9 lines
168 B
JavaScript
Raw Normal View History

'use strict';
module.exports = function isEmpty() {
if (Array.isArray(this.items)) {
return !this.items.length;
}
return !Object.keys(this.items).length;
};