# easyc

> An easy countdown

Latest version **0.0.1** (published 2022-09-29) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2022-09-29 |
| First published | 2022-09-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | bravejs |
| Maintainers | shixianqin |
| Keywords | easyc, countdown |

## Links

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

## Recent versions

- 0.0.1 (latest) — 2022-09-29

## README

# Easy Countdown

## Installation

```
npm i easyc
```

## Example

```ts
import Easyc from 'easyc'

const countdown = new Easyc((seconds: number) => {
  console.log(seconds)
})

countdown.start(60)

countdown.seconds // 60,59,58,57,56,55...
```

## Interface

State in seconds:

+ `-1`: not started
+ `>0`: counting down
+ `=0`: over

```ts
declare class Easyc {
  seconds: number;

  constructor (cb?: (seconds: number) => void);

  start (seconds: number): void;

  end (): void;

  reset (): void;

  cancel (): void;

  destroy (): void;
}
```

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