size.js 329 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 define(['../lang/isArray', '../object/size'], function (isArray, objSize) { /** * Get collection size */ function size(list) { if (!list) { return 0; } if (isArray(list)) { return list.length; } return objSize(list); } return size; });