Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zekth/deno_random_interval

Generates random interval
https://github.com/zekth/deno_random_interval

Last synced: 15 days ago
JSON representation

Generates random interval

Awesome Lists containing this project

README

        

# deno random interval [![Build Status](https://travis-ci.org/zekth/deno_random_interval.svg?branch=master)](https://travis-ci.org/zekth/deno_random_interval)

```ts
import { randomInterval, ClearInterval } from "./mod.ts";

const i: ClearInterval = randomInterval(() => {
console.log("foo");
}, 50); // will prompt randomly foo in the console every 0-50ms

setTimeout(i.clear, 1000); // clear the interval after 1second

```