kpdecker / jsdiff

A javascript text differencing implementation.
BSD 3-Clause "New" or "Revised" License
7.75k stars 491 forks source link

`callback` option has a weird signature #462

Closed ExplodingCabbage closed 5 months ago

ExplodingCabbage commented 6 months ago

The diffing functions take a (currently undocumented) callback option. If provided, the diff is calculated in async mode and the result is passed as the second argument to the callback function.

Unless I'm missing something, the first argument is just... never provided. It's always undefined, whether the diff is calculated successfully or not.

This seems pretty bizarre. We should just eliminate the first argument.