core/Repository.js
function search(keyword, typeFilter) {
        keyword = keyword.toLowerCase();
        typeFilter = typeFilter || type.Element;
        var results = findAll(function (elem) {
            var name = elem.name ? elem.name.toLowerCase() : "";
            return (name.indexOf(keyword) > -1 && elem instanceof typeFilter);
        });
        return results;
    }
function search(keyword, typeFilter) {
        keyword = keyword.toLowerCase();
        typeFilter = typeFilter || type.Element;
        var results = findAll(function (elem) {
            var name = elem.name ? elem.name.toLowerCase() : "";
            return (name.indexOf(keyword) > -1 && elem instanceof typeFilter);
        });
        return results;
    }
function search ( keyword , typeFilter ) { keyword = keyword . toLowerCase ( ) ; typeFilter = typeFilter || type . Element ; var results = findAll ( function ( elem ) { var name = elem . name ? elem . name . toLowerCase ( ) : "" ; return ( name . indexOf ( keyword ) > - 1 && elem instanceof typeFilter ) ; } ) ; return results ; }
Search elements by keyword and type
@param {string} keyword
@param {constructor} typeFilter
@return {Array.<Element>} elements
Search elements by keyword and type