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

Function splitClassesToLookup

lib/test/angular/1.4.3/angular-animate.js:236–250  ·  view source on GitHub ↗
(classes)

Source from the content-addressed store, hash-verified

234 });
235
236 function splitClassesToLookup(classes) {
237 if (isString(classes)) {
238 classes = classes.split(' ');
239 }
240
241 var obj = {};
242 forEach(classes, function(klass) {
243 // sometimes the split leaves empty string values
244 // incase extra spaces were applied to the options
245 if (klass.length) {
246 obj[klass] = true;
247 }
248 });
249 return obj;
250 }
251
252 return classes;
253}

Callers 1

resolveElementClassesFunction · 0.70

Calls 2

isStringFunction · 0.70
forEachFunction · 0.70

Tested by

no test coverage detected