MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / parse

Function parse

lib/test/angular/1.4.3/angular.js:24303–24316  ·  view source on GitHub ↗
(viewValue)

Source from the content-addressed store, hash-verified

24301 var separator = trimValues ? trim(ngList) : ngList;
24302
24303 var parse = function(viewValue) {
24304 // If the viewValue is invalid (say required but empty) it will be `undefined`
24305 if (isUndefined(viewValue)) return;
24306
24307 var list = [];
24308
24309 if (viewValue) {
24310 forEach(viewValue.split(separator), function(value) {
24311 if (value) list.push(trimValues ? trim(value) : value);
24312 });
24313 }
24314
24315 return list;
24316 };
24317
24318 ctrl.$parsers.push(parse);
24319 ctrl.$formatters.push(function(value) {

Callers 1

$SceProviderFunction · 0.70

Calls 3

isUndefinedFunction · 0.70
forEachFunction · 0.70
trimFunction · 0.70

Tested by

no test coverage detected