JAVASCRIPT   104

timer.js

Guest on 29th July 2021 03:22:14 PM

  1. import globalState from '../globalState'
  2.  
  3. /**
  4.  * If `timer` parameter is set, returns number os milliseconds of timer remained.
  5.  * Otherwise, returns null.
  6.  */
  7. export const getTimerLeft = () => {
  8.   return globalState.timeout && globalState.timeout.getTimerLeft()
  9. }

Raw Paste


Login or Register to edit or fork this paste. It's free.