MCPcopy Index your code
hub / github.com/angular-ui/ui-router / tokenDifference

Function tokenDifference

test/angular/1.2/angular.js:7257–7271  ·  view source on GitHub ↗
(str1, str2)

Source from the content-addressed store, hash-verified

7255){}
7256
7257function tokenDifference(str1, str2) {
7258 var values = '',
7259 tokens1 = str1.split(/\s+/),
7260 tokens2 = str2.split(/\s+/);
7261
7262 outer:
7263 for(var i = 0; i < tokens1.length; i++) {
7264 var token = tokens1[i];
7265 for(var j = 0; j < tokens2.length; j++) {
7266 if(token == tokens2[j]) continue outer;
7267 }
7268 values += (values.length > 0 ? ' ' : '') + token;
7269 }
7270 return values;
7271}
7272
7273/**
7274 * @ngdoc provider

Callers 1

$CompileProviderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected