Previously, the callback option had to be a function that takes the result as its second argument; the first argument, meanwhile, was never used. (Some tests name the parameter err; however, there is absolutely no circumstance in which an error, or anything besides undefined, will be passed as the value of that argument.)
This PR fixes this (utterly breaking backwards compat in the process) by making the result be passed as the value of the FIRST argument.
Previously, the
callback
option had to be a function that takes the result as its second argument; the first argument, meanwhile, was never used. (Some tests name the parametererr
; however, there is absolutely no circumstance in which an error, or anything besidesundefined
, will be passed as the value of that argument.)This PR fixes this (utterly breaking backwards compat in the process) by making the result be passed as the value of the FIRST argument.
Resolves https://github.com/kpdecker/jsdiff/issues/462