@dustyjay/countdown-timer

1.1.6 • Public • Published

Countdown-Timer

Installation

Using npm
$ npm install @dustyjay/countdown-timer
Using yarn
$ yarn add @dustyjay/countdown-timer

Usage

import { Countdown } from '@dustyjay/countdown-timer'

var interval;

var timer = Countdown('2021-12-25');
interval = setInterval(() => {
  const result = timer.startCountdown();
  console.log(result) // { days, hours, minutes, seconds, isComplete}
  if (result.isComplete) {
    clearInterval(interval);
  }
}, 1000);

NPM Package

Package Repo: https://github.com/dustyjay/Countdown-Timer

A light-weight package for a simple countdown timer

/@dustyjay/countdown-timer/

    Package Sidebar

    Install

    npm i @dustyjay/countdown-timer

    Weekly Downloads

    8

    Version

    1.1.6

    License

    none

    Unpacked Size

    2.96 kB

    Total Files

    4

    Last publish

    Collaborators

    • dustyjay