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

Function splitClasses

lib/test/angular/1.4.3/angular.js:4770–4786  ·  view source on GitHub ↗
(classes)

Source from the content-addressed store, hash-verified

4768}
4769
4770function splitClasses(classes) {
4771 if (isString(classes)) {
4772 classes = classes.split(' ');
4773 }
4774
4775 // Use createMap() to prevent class assumptions involving property names in
4776 // Object.prototype
4777 var obj = createMap();
4778 forEach(classes, function(klass) {
4779 // sometimes the split leaves empty string values
4780 // incase extra spaces were applied to the options
4781 if (klass.length) {
4782 obj[klass] = true;
4783 }
4784 });
4785 return obj;
4786}
4787
4788// if any other type of options value besides an Object value is
4789// passed into the $animate.method() animation then this helper code

Callers 1

Calls 3

isStringFunction · 0.70
createMapFunction · 0.70
forEachFunction · 0.70

Tested by

no test coverage detected