/*
 * Copyright (c) 2012-2014 Kaarle Ritvanen
 * See LICENSE file for license details
 */

define(["underscore"], function(_) {
    function isList(meta) {
	return _.contains(["list", "set"], meta.type);
    }

    function isCollection(meta) {
	return meta.type == "collection" || isList(meta);
    }

    return {
	isList: isList,
	isCollection: isCollection,
	isTreeNode: function(meta) {
	    return meta.type == "model" || isCollection(meta);
	}
    };
});
