MCPcopy
hub / github.com/methodofaction/Method-Draw / diff

Function diff

test/qunit/qunit.js:873–885  ·  view source on GitHub ↗
( a, b )

Source from the content-addressed store, hash-verified

871
872// returns a new Array with the elements that are in a but not in b
873function diff( a, b ) {
874 var result = a.slice();
875 for ( var i = 0; i < result.length; i++ ) {
876 for ( var j = 0; j < b.length; j++ ) {
877 if ( result[i] === b[j] ) {
878 result.splice(i, 1);
879 i--;
880 break;
881 }
882 }
883 }
884 return result;
885}
886
887function fail(message, exception, callback) {
888 if ( typeof console !== "undefined" && console.error && console.warn ) {

Callers 2

checkPollutionFunction · 0.85
qunit.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected