# dothis

> Call a function after a certain set of time or on a specific Date.

Latest version **1.0.0** (published 2014-11-24) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-11-24 |
| First published | 2014-11-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mikko Haapoja |
| Maintainers | mikkoh |
| Keywords | settimeout, event, date, milliseconds, seconds, minutes, hours, minutes, days |

## Links

- npm: https://www.npmjs.com/package/dothis
- Repository: https://github.com/Jam3/dothis
- Issues: https://github.com/Jam3/dothis/issues
- npm.io page: https://npm.io/package/dothis

## Dependencies (1)

- [raf](https://npm.io/package/raf.md) ^2.0.4

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2014-11-24

## README

dothis
======

[![browser support](https://ci.testling.com/jam3/dothis.png)
](https://ci.testling.com/jam3/dothis)

You can use `dothis` to be able to call functions after a certain period of time (kind of like `setTimeout`) or on a specific date.

## Example
```javascript
var dothis = require( 'dothis' );

// Using with a time
dothis( function( offBy, percentage ) {  console.log( 'Finished', offBy, 'milliseconds late.' ); })
.in( 1000 ) // in one second
.update( function( offBy, percentage ) { console.log( 'We\'re', percentage, 'done.' ) });

// Using with a date
dothis( function( offBy, percentage ) {  console.log( 'Finished', offBy, 'milliseconds late.' ); })
.at( new Date( Datw.now() + 1000 ) ) // use a date to represent in one second
.update( function( offBy, percentage ) { console.log( 'We\'re', percentage, 'done.' ) });
```

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