# custom-timeouts

> Custom module to handle timeouts with a Promise so you can await your timeouts easily

Latest version **1.0.4** (published 2022-02-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install custom-timeouts
pnpm add custom-timeouts
yarn add custom-timeouts
bun add custom-timeouts
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-02-14 |
| First published | 2022-02-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shay Kintzlinger |
| Maintainers | kshayk |
| Keywords | timeout |

## Links

- npm: https://www.npmjs.com/package/custom-timeouts
- Repository: https://github.com/kshayk/custom-timeout-npm
- Homepage: https://github.com/kshayk/custom-timeout-npm#readme
- Issues: https://github.com/kshayk/custom-timeout-npm/issues
- npm.io page: https://npm.io/package/custom-timeouts

## Recent versions

- 1.0.4 (latest) — 2022-02-14
- 1.0.3 — 2022-02-14
- 1.0.2 — 2022-02-14
- 1.0.1 — 2022-02-14
- 1.0.0 — 2022-02-10

## README

# Custom timeouts

With this package you will be able to call functions that will perform a timeout with a promise, giving you the option 
to easily use ```await``` on those functions.

To install the package, run the following on your machine:

```npm i custom-timeouts```

Then, to use the package, simply import it to your file:

```javascript
const timeouts = require('custom-timeouts');
```

Then, use one of the following available functions: ```milliseconds()```, ```seconds()```, ```minutes()```, ```hours()```.

For example, we can see the usage on the ```seconds()``` function in the following code snippet:

```javascript
const timeouts = require('custom-timeouts');

const myWaitingFunc = async () => {
  await timeouts.seconds(3)
};

myWaitingFunc();
```

You can also destructure the module for the desired function:

```javascript
const {seconds} = require('custom-timeouts');
```

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