MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / splitClasses

Function splitClasses

lib/test/angular/1.5.0/angular.js:4930–4946  ·  view source on GitHub ↗
(classes)

Source from the content-addressed store, hash-verified

4928}
4929
4930function splitClasses(classes) {
4931 if (isString(classes)) {
4932 classes = classes.split(' ');
4933 }
4934
4935 // Use createMap() to prevent class assumptions involving property names in
4936 // Object.prototype
4937 var obj = createMap();
4938 forEach(classes, function(klass) {
4939 // sometimes the split leaves empty string values
4940 // incase extra spaces were applied to the options
4941 if (klass.length) {
4942 obj[klass] = true;
4943 }
4944 });
4945 return obj;
4946}
4947
4948// if any other type of options value besides an Object value is
4949// 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