Note. Now .chain is just a deprecated alias for then .
What chain does is basically what then does, except that it doesn't decompress promises. The chain is the correct "monadic flat map", not then , which automatically decompresses promises.
Discussed over long distances on the mailing list and at TC meetings. It was decided against.
.chain is just a religion of the past in Chrome, it may be released in a future release, but no one currently advocates for an offer, including it. I would not use it in production.
source share