MCPcopy
hub / github.com/angular-ui/ui-grid / splitClasses

Function splitClasses

lib/test/angular/1.8.0/angular.js:5536–5552  ·  view source on GitHub ↗
(classes)

Source from the content-addressed store, hash-verified

5534}
5535
5536function splitClasses(classes) {
5537 if (isString(classes)) {
5538 classes = classes.split(' ');
5539 }
5540
5541 // Use createMap() to prevent class assumptions involving property names in
5542 // Object.prototype
5543 var obj = createMap();
5544 forEach(classes, function(klass) {
5545 // sometimes the split leaves empty string values
5546 // incase extra spaces were applied to the options
5547 if (klass.length) {
5548 obj[klass] = true;
5549 }
5550 });
5551 return obj;
5552}
5553
5554// if any other type of options value besides an Object value is
5555// 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