Closed jucrouzet closed 7 years ago
thanks @jucrouzet - I'll take a close look
i really appreciate the pull request - if it takes me more than a day or so for me to review its cause there are a number of downstream deps and we just have to be careful due to that
Done. I'm also not for including Bluebird, for a LOT of reason.
For the downstream deps, that's what came first to my mind, that's why I added a new method instead of modifying the getPort()
method to return a promise when called with no callback.
BTW, I forgot the TS definition, done.
Hi, I've check all my projects using portfinder (~30). They're all doing good with this PR, (some uses it bare, some use it with bluebird's promisify).
Let me know if there is something to change.
@jucrouzet - yes this is fine - thanks for adding it to the README and fixing up the error
published to npm
Adds
getPortPromise()
which returns a Promise to the next available port :