Use callback functions over options.then
whizkydee opened this issue · 0 comments
whizkydee commented
The API as at v1.1.0
provides options.then
to be able access input and result.
reverse('dog', {
then: (a, b) => `${a} was changed to ${b}`
})
From v2.0.0
however, we should use callback functions as the third argument over options.then
.
options
would take in an object or falsy values which would implicitly get converted to an empty object.
reverse('dog', null, (a, b) => `${a} was changed to ${b}`)