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

Function tokenDifference

web/static/components/angularjs/angular.js:7157–7171  ·  view source on GitHub ↗
(str1, str2)

Source from the content-addressed store, hash-verified

7155){}
7156
7157function tokenDifference(str1, str2) {
7158 var values = '',
7159 tokens1 = str1.split(/\s+/),
7160 tokens2 = str2.split(/\s+/);
7161
7162 outer:
7163 for(var i = 0; i < tokens1.length; i++) {
7164 var token = tokens1[i];
7165 for(var j = 0; j < tokens2.length; j++) {
7166 if(token == tokens2[j]) continue outer;
7167 }
7168 values += (values.length > 0 ? ' ' : '') + token;
7169 }
7170 return values;
7171}
7172
7173/**
7174 * @ngdoc provider

Callers 1

$CompileProviderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected