MCPcopy Create free account
hub / github.com/binux/qiandao / parse

Function parse

web/static/components/angularjs/angular.js:17982–17995  ·  view source on GitHub ↗
(viewValue)

Source from the content-addressed store, hash-verified

17980 separator = match && new RegExp(match[1]) || attr.ngList || ',';
17981
17982 var parse = function(viewValue) {
17983 // If the viewValue is invalid (say required but empty) it will be `undefined`
17984 if (isUndefined(viewValue)) return;
17985
17986 var list = [];
17987
17988 if (viewValue) {
17989 forEach(viewValue.split(separator), function(value) {
17990 if (value) list.push(trim(value));
17991 });
17992 }
17993
17994 return list;
17995 };
17996
17997 ctrl.$parsers.push(parse);
17998 ctrl.$formatters.push(function(value) {

Callers 1

$SceProviderFunction · 0.70

Calls 2

forEachFunction · 0.85
isUndefinedFunction · 0.70

Tested by

no test coverage detected