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

Function splitClasses

test/angular/1.5/angular.js:5099–5115  ·  view source on GitHub ↗
(classes)

Source from the content-addressed store, hash-verified

5097}
5098
5099function splitClasses(classes) {
5100 if (isString(classes)) {
5101 classes = classes.split(' ');
5102 }
5103
5104 // Use createMap() to prevent class assumptions involving property names in
5105 // Object.prototype
5106 var obj = createMap();
5107 forEach(classes, function(klass) {
5108 // sometimes the split leaves empty string values
5109 // incase extra spaces were applied to the options
5110 if (klass.length) {
5111 obj[klass] = true;
5112 }
5113 });
5114 return obj;
5115}
5116
5117// if any other type of options value besides an Object value is
5118// 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