MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / compareArrays

Function compareArrays

static/plugins/chart.js/Chart.bundle.js:14984–14996  ·  view source on GitHub ↗
(array1, array2, dontConvert)

Source from the content-addressed store, hash-verified

14982
14983 // compare two arrays, return the number of differences
14984 function compareArrays(array1, array2, dontConvert) {
14985 var len = Math.min(array1.length, array2.length),
14986 lengthDiff = Math.abs(array1.length - array2.length),
14987 diffs = 0,
14988 i;
14989 for (i = 0; i < len; i++) {
14990 if ((dontConvert && array1[i] !== array2[i]) ||
14991 (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
14992 diffs++;
14993 }
14994 }
14995 return diffs + lengthDiff;
14996 }
14997
14998 function warn(msg) {
14999 if (hooks.suppressDeprecationWarnings === false &&

Callers 2

chooseLocaleFunction · 0.85

Calls 1

toIntFunction · 0.85

Tested by

no test coverage detected