Closed driverjb closed 4 years ago
I reviewed the travis CI jobs. It's failing for Node 6, 7, 8 and 9. These Node versions are no longer supported. It passed the Node 10 tests. I developed and unit tested my code on the latest LTS build (Node 12).
You should remove the no longer supported versions especially given that this is a security related software product.
I am closing this request and will resubmit with the updated travis configuration.
I closed my previous pull request because it had some extraneous changes due to some editor formatting differences. This PR does not have that problem. The following has been added:
jsonApiCallAsync
: Works just like jsonApiCall but instead of expecting a callback function a Promise object is returned. The promise will resolve when the 'stat' field is 'OK'. It will reject when the 'stat' field is not 'OK'. This makes for better use of Promise patterns like then().catch() and try/catch.apiCallAsync
: Works just like apiCall but returns a Promise following the same pattern asjsonApiCallAsync
.This does not touch the existing functionality. In fact it uses it. So these behave exactly the same as the original calls, but with the added convenience of being Promises. These changes will have no effect on those currently using the library (thus the minor version increment instead of major).