daily pastebin goal
72%
SHARE
TWEET

Untitled

a guest Jan 19th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getAccountBill() {
  2.     const accountBill = `2222${Math.floor(
  3.       Math.random() * 90000000000000000000,
  4.     ) + 10000000000000000000}`;
  5.  
  6.     Bill.findOne({
  7.       where: {
  8.         account_bill: accountBill,
  9.       },
  10.     })
  11.       .then(isAccountBill => {
  12.         if (!isAccountBill) {
  13.           getAccountBill();
  14.         }
  15.         return accountBill;
  16.       })
  17.       .catch(err => {
  18.         /* just ignore */
  19.       });
  20.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top