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

Function splitClasses

lib/test/angular/1.7.0/angular.js:5421–5437  ·  view source on GitHub ↗
(classes)

Source from the content-addressed store, hash-verified

5419}
5420
5421function splitClasses(classes) {
5422 if (isString(classes)) {
5423 classes = classes.split(' ');
5424 }
5425
5426 // Use createMap() to prevent class assumptions involving property names in
5427 // Object.prototype
5428 var obj = createMap();
5429 forEach(classes, function(klass) {
5430 // sometimes the split leaves empty string values
5431 // incase extra spaces were applied to the options
5432 if (klass.length) {
5433 obj[klass] = true;
5434 }
5435 });
5436 return obj;
5437}
5438
5439// if any other type of options value besides an Object value is
5440// 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