(classes)
| 4888 | } |
| 4889 | |
| 4890 | function splitClasses(classes) { |
| 4891 | if (isString(classes)) { |
| 4892 | classes = classes.split(' '); |
| 4893 | } |
| 4894 | |
| 4895 | // Use createMap() to prevent class assumptions involving property names in |
| 4896 | // Object.prototype |
| 4897 | var obj = createMap(); |
| 4898 | forEach(classes, function(klass) { |
| 4899 | // sometimes the split leaves empty string values |
| 4900 | // incase extra spaces were applied to the options |
| 4901 | if (klass.length) { |
| 4902 | obj[klass] = true; |
| 4903 | } |
| 4904 | }); |
| 4905 | return obj; |
| 4906 | } |
| 4907 | |
| 4908 | // if any other type of options value besides an Object value is |
| 4909 | // passed into the $animate.method() animation then this helper code |
no test coverage detected