Guest User

Untitled

a guest
Oct 23rd, 2019
93
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const formatBigIntNum = (value) => {
  2. if (isNaN(value)) return value
  3. const isInteger = Math.floor(value) === value
  4. return isInteger ?
  5. String(value).replace(/(?=(\B\d{3})+$)/g, ',') :
  6. value
  7. }
RAW Paste Data