MCPcopy Create free account
hub / github.com/nodejs/node / cmp

Function cmp

test/sequential/test-crypto-timing-safe-equal.js:41–41  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

39 // ignoring the TypedArray type completely.
40
41 const cmp = (fn) => (a, b) => a.every((x, i) => fn(x, b[i]));
42 const eq = cmp((a, b) => a === b);
43 const is = cmp(Object.is);
44

Calls 2

everyMethod · 0.80
fnFunction · 0.70

Tested by

no test coverage detected