# iauction

> helps you watch your countdown

Latest version **0.0.9** (published 2022-04-26) · 0 weekly downloads

## Install

```sh
npm install iauction
pnpm add iauction
yarn add iauction
bun add iauction
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2022-04-26 |
| First published | 2022-04-18 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | irwansyafani |
| Maintainers | irwansyafani |
| Keywords | auction, nft, dutch auction, timer, dutch, countdown, iauction |

## Links

- npm: https://www.npmjs.com/package/iauction
- Repository: https://github.com/irwansyafani/iauction
- Homepage: https://github.com/irwansyafani/iauction#readme
- Issues: https://github.com/irwansyafani/iauction/issues
- npm.io page: https://npm.io/package/iauction

## Recent versions

- 0.0.9 (latest) — 2022-04-26
- 0.0.8 — 2022-04-21
- 0.0.7 — 2022-04-20
- 0.0.6 — 2022-04-19
- 0.0.5 — 2022-04-19
- 0.0.4 — 2022-04-19
- 0.0.3 — 2022-04-19
- 0.0.2 — 2022-04-19
- 0.0.1 — 2022-04-18

## README

# iAuction

![npm](https://img.shields.io/npm/v/iauction?color=green)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/irwansyafani/iauction)

Helps you watch your countdown

## Installation

Using NPM:

```vim
npm install iauction
```

Using Yarn:

```vim
yarn add iauction
```

## Usage

```js
// 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] }
  });
}, [])
```

| Parameters       | Value type | Description                                                                                                                                                                                                        | Information                                                                                                                              |
| ---------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `countdownInMin` | `integer`  | set your timer interface, it will affect to your callback                                                                                                                                                          |  default `2`
| `startDate`      | `string`   | when 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 `true` | use your **local time** and set with the format (`YYYY-MM-DD HH:mm:ss`) this will be convert to universal time in the system             |
| `endDate`        | `string`   | when the countdown should stop and don't call your `callback` again                                                                                                                                                | use your **local time** and set with the format (`YYYY-MM-DD HH:mm:ss`) this will be convert to universal time in the system             |
| `callback`       | `function` | this 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:

<ul>
  <li>Handling auction such dutch auction for NFT</li>
  <li>Handling common auction</li>
</ul>

<div style="background-color: rgba(173, 57, 199, 0.26); color: white; padding: 1rem; margin-top: 3rem">
  <h4>Support this package by adding features 🏏</h4>
  
  <h4>Steps:</h4>
  <ul> 
    <li>Create feature on your local machine and make sure it's work</li> 
    <li>Don't forget to put documentation and also test case to help me use your feature</li> 
    <li>Make a <a href="https://github.com/irwansyafani/iauction/pulls" >request</a> from your branch <i>([username]-[feature_name])</i> to branch <i>features</i></li>
  </ul>

✏️ notes: please create your branch by following this format: ([username]-[feature_name])

</div>

---
_Source: https://npm.io/package/iauction · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
