MCPcopy Index your code
hub / github.com/angular-ui/ui-router / splitClasses

Function splitClasses

test/angular/1.4/angular.js:4890–4906  ·  view source on GitHub ↗
(classes)

Source from the content-addressed store, hash-verified

4888}
4889
4890function 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

Callers 1

handleCSSClassChangesFunction · 0.70

Calls 3

isStringFunction · 0.70
createMapFunction · 0.70
forEachFunction · 0.70

Tested by

no test coverage detected