Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoudenberg-kasisto committed May 12, 2023
1 parent 6967e38 commit 83f25f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ Output:
## Change Log
- 1.0.4 Fix typo that broke -o/--output-keys
- 1.0.3 Change from cli-color to colors to reduce package size.
- 1.0.2 Add colorize and colorizeToCallback to module exports (Fix bug #103)
- 1.0.1 Bug fixes: Properly compare date objects; properly exclude keys with -x; improve README readability.
Expand Down
8 changes: 6 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class JsonDiff {
}

findMatchingObject (item, index, fuzzyOriginals) {
// console.log("findMatchingObject: " + JSON.stringify({item, fuzzyOriginals}, null, 2))
// console.log('findMatchingObject: ' + JSON.stringify({item, fuzzyOriginals}, null, 2))
let bestMatch = null

for (const [key, { item: candidate, index: matchIndex }] of Object.entries(fuzzyOriginals)) {
Expand All @@ -93,11 +93,12 @@ class JsonDiff {
}
}

// console.log"findMatchingObject result = " + JSON.stringify(bestMatch, null, 2)
// console.log('findMatchingObject result = ' + JSON.stringify(bestMatch, null, 2));
return bestMatch
}

scalarize (array, originals, fuzzyOriginals) {
console.log('scalarize', array, originals, fuzzyOriginals);
const fuzzyMatches = []
if (fuzzyOriginals) {
// Find best fuzzy match for each object in the array
Expand Down Expand Up @@ -128,6 +129,7 @@ class JsonDiff {
result.push(key)
}
}
console.log('Scalarize result', result);
return result
}

Expand Down Expand Up @@ -326,6 +328,8 @@ class JsonDiff {
result = undefined
}

console.log(`diff: equal ${equal} obj1 ${obj1} obj2 ${obj2} score ${score} ${result || ''}`)

return { score, result, equal }
}
}
Expand Down

0 comments on commit 83f25f4

Please sign in to comment.