Vane's Life
  • Home
  • GitHub
  • Blog (Legacy)
  • About
  • Emi's Life
Sign in Subscribe

Promises

A collection of 1 post
Promises

Break or Cancel the Promises Chain

Promise Promise has become an important tool for managing asynchronous operations in JavaScript. However, sometimes we would still find promises kind of annoying. Promise // Here `then` is an equivalence to `Promise.resolve().then`. .then(() => { // Start. }) .then(() => { if (wantToBreakHere) { // How? } }) .then(() => { // Something to skip. }); We may nest the
Aug 19, 2015 2 min read
Page 1 of 1
Vane's Life © 2025
Powered by Ghost