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

Function splitClasses

lib/test/angular/1.6.7/angular.js:5425–5441  ·  view source on GitHub ↗
(classes)

Source from the content-addressed store, hash-verified

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