# thyming

> Small wrappers for setTimeout and setInterval which return methods to cancel them.

Latest version **0.1.1** (published 2016-07-21) · MIT license · 0 weekly downloads

## Install

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

## 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.1.1 |
| Published | 2016-07-21 |
| First published | 2016-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Chris Vickery |
| Maintainers | chrisinajar |
| Keywords | setTimeout, setInterval, functional, timeout, interval |

## Links

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

## Dependencies (1)

- [assert-function](https://npm.io/package/assert-function.md) ^1.0.0

## Recent versions

- 0.1.1 (latest) — 2016-07-21
- 0.1.0 — 2016-07-21

## README

# Thyming
Small wrappers for setTimeout and setInterval which return methods to cancel them.

## Install

`npm install thyming`

## Usage

```js
// same with require('thyming').timeout;
var interval = require('thyming').interval;

var stop = interval(function () {
  // do something later!
});

/* ... */
// cancel the timer
stop();
```

# API

#### `thyming.timeout(fn, ms)` -> `function`

Returns a method to cancel the timer.

##### fn

*Required*  
Type: `function`

The method to pass in to setTimeout, will be run after `ms` milliseconds.

##### ms

Type: `number`

The number of milliseconds to wait before executing `fn`.

#### `thyming.interval(fn, ms)` -> `function`

Returns a method to cancel the timer.


##### fn

*Required*  
Type: `function`

The method to pass in to setInterval, will be run every `ms` milliseconds.

##### ms

Type: `number`

The number of milliseconds to wait between executing `fn`.

# License
MIT

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