node-soap icon indicating copy to clipboard operation
node-soap copied to clipboard

promisifyMethod return object instead of array to allow for destructuring

Open anasik opened this issue 2 years ago • 0 comments

Currently, if users do this:

const result = await client.MyFunction(args) The result will be equal to an array containing result, rawResponse, soapHeader, rawRequest, mtomAttachments. And if they want just the parsed JSON response they have to do result[0].

This is fine. But if we make promisify return an object instead of an array, they could do this:

const { result } = await client.MyFunction(args)

anasik avatar May 16 '22 12:05 anasik