nat-api icon indicating copy to clipboard operation
nat-api copied to clipboard

Use promises instead of callbacks (async)

Open betamos opened this issue 4 years ago • 0 comments

Anecdote: I successfully used es6-promisify with this module:

const client = new NatAPI()
const asyncMap = promisify(client.map.bind(client))
// ...
await asyncMap({..})

Would you consider a PR to make the API use promises entirely? I'm unsure of how legacy interoperability in node-land is handled so maybe it's not desirable, please let me know.

betamos avatar May 05 '20 04:05 betamos