* @inner * @param {Array. |string} types model types * @return {Object} key: {string} type, value: {Array. } models
(componentsMap, types)
| 21906 | * @return {Object} key: {string} type, value: {Array.<Object>} models |
| 21907 | */ |
| 21908 | function getComponentsByTypes(componentsMap, types) { |
| 21909 | if (!isArray(types)) { |
| 21910 | types = types ? [types] : []; |
| 21911 | } |
| 21912 | |
| 21913 | var ret = {}; |
| 21914 | each$1(types, function (type) { |
| 21915 | ret[type] = (componentsMap.get(type) || []).slice(); |
| 21916 | }); |
| 21917 | |
| 21918 | return ret; |
| 21919 | } |
| 21920 | |
| 21921 | /** |
| 21922 | * @inner |
no test coverage detected