* 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)
| 27 | * 2. The value to perform the operation on |
| 28 | */ |
| 29 | function 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 | |
| 40 | module.exports = { |
| 41 | diff, |
no test coverage detected
searching dependent graphs…