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

Function diff

lib/internal/util/diff.js:29–38  ·  view source on GitHub ↗

* Generate a difference report between two values * @param {Array | string} actual - The first value to compare * @param {Array | string} expected - The second value to compare * @returns {Array} - An array of differences between the two values. * The returned data is an array of arrays, where

(actual, expected)

Source from the content-addressed store, hash-verified

27 * 2. The value to perform the operation on
28 */
29function diff(actual, expected) {
30 if (actual === expected) {
31 return [];
32 }
33
34 validateInput(actual, 'actual');
35 validateInput(expected, 'expected');
36
37 return ArrayPrototypeReverse(myersDiff(actual, expected));
38}
39
40module.exports = {
41 diff,

Callers 1

test-diff.jsFile · 0.85

Calls 2

validateInputFunction · 0.85
myersDiffFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…