angular-cn/aio/tools/transforms/angular-base-package/rendering/hasValues.js

9 lines
230 B
JavaScript

module.exports = function hasValues() {
return {
name: 'hasValues',
process: function(list, property) {
if (!list || !Array.isArray(list)) return false;
return list.some(item => item[property]);
}
};
};