# click-behavior

> click function for wrap a onclick handler. oh! somebody double-click this button! which post to the server twice!!!!

Latest version **0.0.2** (published 2017-09-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install click-behavior
pnpm add click-behavior
yarn add click-behavior
bun add click-behavior
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2017-09-08 |
| First published | 2017-09-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | IAIAE |
| Maintainers | iaiae |
| Keywords | click, double-click |

## Links

- npm: https://www.npmjs.com/package/click-behavior
- Repository: https://github.com/IAIAE/click-behavior
- Homepage: https://github.com/IAIAE/click-behavior#readme
- Issues: https://github.com/IAIAE/click-behavior/issues
- npm.io page: https://npm.io/package/click-behavior

## Recent versions

- 0.0.2 (latest) — 2017-09-08
- 0.0.1 — 2017-09-08

## README

# click-behavior
click-behavior wrap function for onClick.


#usage
two parameters: `clickBehavoir(config, handler)`

```javascript
import {clickBehavior} from 'click-behavior'

let clickHandler = (e)=>{
    console.info(e)
}

///before
<div onClick={clickHandler}></div>

///now
<div onClick={clickBehavior({interval: 1000}, clickHandler)}></div>

```

## options

```javascript
clickBehavior({
    interval: 1000 //cannot click until 1000ms after
}, handler);

// or
clickBehavior({
    cb: true //cannot click until finish is called
}, (e, finish)=>{
    console.info(e);
    finish()
});


```

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