0.0.9 ā€¢ Published 2 years ago

iauction v0.0.9

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

iAuction

npm GitHub code size in bytes

Helps you watch your countdown

Installation

Using NPM:

npm install iauction

Using Yarn:

yarn add iauction

Usage

// basic
const iauction = require("iauction")
...
iauction({
  countdownInMin: 1,
  startDate: "2022/04/26 17:30:00",
  endDate: "2022/04/26 17:30:00",
  callback: (time) => console.log(time),
});

// UNIX date
iauction({
  countdownInMin: 2,
  startDate: 1650974160000,
  endDate: 1650974400000,
  callback: (time) => console.log(time),
});

// e.g React JS
import iauction from "iauction"

...
useEffect(() => {
  iauction({
    countdownInMin: 1,
    startDate: "2022/04/26 17:33:00",
    endDate: "2022/04/26 17:33:00",
    callback: (time) => console.log(time),
    // time ~ { start: [bool], time: [string], reps: [integer] }
  });
}, [])
ParametersValue typeDescriptionInformation
countdownInMinintegerset your timer interface, it will affect to your callbackdefault 2
startDatestringwhen to start, basically the timer always do their job, but start and reps will tell you is the status was start (boolean) and how many repetition (reps) left until the status start change to trueuse your local time and set with the format (YYYY-MM-DD HH:mm:ss) this will be convert to universal time in the system
endDatestringwhen the countdown should stop and don't call your callback againuse your local time and set with the format (YYYY-MM-DD HH:mm:ss) this will be convert to universal time in the system
callbackfunctionthis function will return the { start: [boolean], time: [string], reps: [integer] }start: indicates is now time to start?, time: indicates the countdown, reps: how many repetition has been through from startDate

Why iAuction?

iauction helps you to watch your countdown and set the start and end datetime easier by using your local time.

iauction methods are great for:

āœļø notes: please create your branch by following this format: (username-feature_name)

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago