keystone
Version:
Web Application Framework and Admin GUI / Content Management System built on Express.js and Mongoose
18 lines (14 loc) • 355 B
JavaScript
var _ = require('lodash');
/**
* Retrieves orphaned lists (those not in a nav section)
*/
function getOrphanedLists () {
if (!this.nav) {
return [];
}
return _.filter(this.lists, function (list, key) {
if (list.get('hidden')) return false;
return (!this.nav.by.list[key]) ? list : false;
}.bind(this));
}
module.exports = getOrphanedLists;