brianleroux / tiny-json-http

:anchor: Minimalist HTTP client for JSON payloads.
172 stars 18 forks source link

Don't wait for Node 8 - Promises now! #5

Closed BigAB closed 7 years ago

BigAB commented 7 years ago

As an alternative to #4 I propose you just add this feature:

If no callback is supplied, return a promise, otherwise behave exactly as before.

This will work now, without waiting for node to be supported on lambda and will continue to work with async functions on node 8.

I tried to match the code style, I could of course change anything you don't like.

brianleroux commented 7 years ago

I really like this PR! Sorry I haven't gotten around to this --- I think we can merge but want to get #7 merged in first!

BigAB commented 7 years ago

Rebased onto master

BigAB commented 7 years ago

Added docs to Readme

brianleroux commented 7 years ago

thx a lot @BigAB / looks great! publishing in 5.3 💜