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

Function splitClassesToLookup

test/angular/1.4/angular-animate.js:306–320  ·  view source on GitHub ↗
(classes)

Source from the content-addressed store, hash-verified

304 });
305
306 function splitClassesToLookup(classes) {
307 if (isString(classes)) {
308 classes = classes.split(' ');
309 }
310
311 var obj = {};
312 forEach(classes, function(klass) {
313 // sometimes the split leaves empty string values
314 // incase extra spaces were applied to the options
315 if (klass.length) {
316 obj[klass] = true;
317 }
318 });
319 return obj;
320 }
321
322 return classes;
323}

Callers 1

resolveElementClassesFunction · 0.70

Calls 2

isStringFunction · 0.70
forEachFunction · 0.70

Tested by

no test coverage detected