/time-count-down

time count down

Primary LanguageJavaScriptMIT LicenseMIT

npm Travis (.org) Coveralls github npm

Simple timer count down for future time

Install

  $ npm install future-count-down--save

Usage

const countdown=require('future-count-down')
countdown({
  endDate:new Date('2020-12-1')//a future time
  interval:1000// millseconds,
  run:function({days,hours,minutes,seconds}){
    console.log(`${days} days ${hours}:${minutes}:${seconds}`)
  },
  finish(){
    //do something when finished
  }
})

License

MIT © insonghua2.