node-toggl-api icon indicating copy to clipboard operation
node-toggl-api copied to clipboard

Support Promises

Open dguo opened this issue 6 years ago • 1 comments

Hi, is there any interest in adding support for Promises? One technique is to check if a callback is provided, and if not, return a Promise. This method should maintain backwards compatibility.

dguo avatar Feb 03 '19 03:02 dguo

@estliberitas ?

yudikubota avatar Apr 07 '20 15:04 yudikubota

Your suggestion worked quite well. This will be merged and published by me with the v9 migration, which is more urgent. I didn't mean to start implementing this till v9 were done, but having this will avoid callback hell during testing all the endpoints.

rzfzr avatar Apr 19 '24 00:04 rzfzr