# promised-debounce

> For limiting the time to resolve a promise.

Latest version **0.4.2** (published 2016-11-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install promised-debounce
pnpm add promised-debounce
yarn add promised-debounce
bun add promised-debounce
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.2 |
| Published | 2016-11-24 |
| First published | 2016-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Kristijan Sedlak |
| Maintainers | xpepermint |
| Keywords | promise, debounce, delay, promised, as, with, resolve, reject |

## Links

- npm: https://www.npmjs.com/package/promised-debounce
- Repository: https://github.com/xpepermint/promised-debounce
- Homepage: https://github.com/xpepermint/promised-debounce#readme
- Issues: https://github.com/xpepermint/promised-debounce/issues
- npm.io page: https://npm.io/package/promised-debounce

## Dependencies (1)

- [babel-runtime](https://npm.io/package/babel-runtime.md) 6.18.x

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 0.4.2 (latest) — 2016-11-24
- 0.4.1 — 2016-11-24
- 0.4.0 — 2016-11-11
- 0.3.3 — 2016-11-09
- 0.3.2 — 2016-11-09
- 0.3.1 — 2016-11-09

## README

![Build Status](https://travis-ci.org/xpepermint/promised-debounce.svg?branch=master)&nbsp;[![NPM Version](https://badge.fury.io/js/promised-debounce.svg)](https://badge.fury.io/js/promised-debounce)&nbsp;[![Dependency Status](https://gemnasium.com/xpepermint/promised-debounce.svg)](https://gemnasium.com/xpepermint/promised-debounce)

# promised-debounce

> For debouncing function execution.

This is a light weight open source package for use on **server** or in **browser** (using module bundler). The source code is available on [GitHub](https://github.com/xpepermint/promised-debounce) where you can also find our [issue tracker](https://github.com/xpepermint/promised-debounce/issues).

## Related Projects

* [promised-timeout](https://github.com/xpepermint/promised-timeout): For limiting the time to resolve a promise.

## Install

```
$ npm install --save promised-debounce
```

## Example

```js
import {createDebouncer} from 'promised-debounce';

let debounce = createDebouncer(); // create new debounced instance

await debounce(() => console.log('result'), 1000); // => "result"
```

## API

**debounce({handler, time})**:Promise

> A helper function which resolves the provider `handler` as debounce function.

| Option | Type | Required | Default | Description
|--------|------|----------|---------|------------
| handler | Function,Promise | Yes | - | A function to be executed.
| time | Integer | No | 0 | A time in milliseconds for which the function should be debounced.

## License (MIT)

```
Copyright (c) 2016 Kristijan Sedlak <xpepermint@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```

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