MCPcopy Index your code
hub / github.com/nodejs/node / arrayHasEqualMapElement

Function arrayHasEqualMapElement

lib/internal/util/comparisons.js:822–833  ·  view source on GitHub ↗
(array, key1, item1, b, mode, memo, comparator, start, end)

Source from the content-addressed store, hash-verified

820}
821
822function arrayHasEqualMapElement(array, key1, item1, b, mode, memo, comparator, start, end) {
823 for (let i = end - 1; i >= start; i--) {
824 const key2 = array[i];
825 if (comparator(key1, key2, mode, memo) &&
826 innerDeepEqual(item1, b.get(key2), mode, memo)) {
827 // Move the matching element to make sure we do not check that again.
828 array[i] = array[end];
829 return true;
830 }
831 }
832 return false;
833}
834
835function mapObjectEquiv(array, a, b, mode, memo) {
836 let direction = 1;

Callers 2

partialObjectMapEquivFunction · 0.85
mapObjectEquivFunction · 0.85

Calls 3

comparatorFunction · 0.85
innerDeepEqualFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected