The linked code block is basically the poster child of why async/await was made.
openpgp.cleartext
.readArmored(req.body.message)
.then(message => {
openpgp.key
.readArmored(nodes[0].value.key)
.then(key => {
...
})
})
could be openpgp.cleartext
.readArmored(req.body.message)
.then(message =>
openpgp.key.readArmored(nodes[0].value.key)
)
.then(key => {
...
})This and similar subthreads in this Show HN entry are a good example of pointless, hostile, obnoxiously-pedantic-without-even-being-technically-correct wankery that makes HN an often terrible place for conversations.