MCPcopy Create free account
hub / github.com/OpenReservation/OpenReservation / splitClasses

Function splitClasses

OpenReservation/wwwroot/Scripts/angular.js:4940–4957  ·  view source on GitHub ↗
(classes)

Source from the content-addressed store, hash-verified

4938 }
4939
4940 function splitClasses(classes) {
4941 if (isString(classes)) {
4942 classes = classes.split(' ');
4943 }
4944
4945 // Use createMap() to prevent class assumptions involving property names in
4946 // Object.prototype
4947 var obj = createMap();
4948 forEach(classes,
4949 function (klass) {
4950 // sometimes the split leaves empty string values
4951 // incase extra spaces were applied to the options
4952 if (klass.length) {
4953 obj[klass] = true;
4954 }
4955 });
4956 return obj;
4957 }
4958
4959 // if any other type of options value besides an Object value is
4960 // passed into the $animate.method() animation then this helper code

Callers 1

handleCSSClassChangesFunction · 0.85

Calls 3

isStringFunction · 0.85
createMapFunction · 0.85
forEachFunction · 0.85

Tested by

no test coverage detected