MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / parse

Function parse

code/songhop/www/lib/angular/angular.js:21423–21436  ·  view source on GitHub ↗
(viewValue)

Source from the content-addressed store, hash-verified

21421 var separator = trimValues ? trim(ngList) : ngList;
21422
21423 var parse = function(viewValue) {
21424 // If the viewValue is invalid (say required but empty) it will be `undefined`
21425 if (isUndefined(viewValue)) return;
21426
21427 var list = [];
21428
21429 if (viewValue) {
21430 forEach(viewValue.split(separator), function(value) {
21431 if (value) list.push(trimValues ? trim(value) : value);
21432 });
21433 }
21434
21435 return list;
21436 };
21437
21438 ctrl.$parsers.push(parse);
21439 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