Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/zekth/deno_random_interval
- Owner: zekth
- License: mit
- Created: 2019-05-09T15:43:21.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-13T19:50:06.000Z (over 5 years ago)
- Last Synced: 2024-10-19T00:20:48.788Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-deno - deno_random_interval - 生成随机间隔的工具。 (Uncategorized / Uncategorized)
- awesome-deno-cn - @zekth/deno_random_interval
- awesome-deno - deno_random_interval - Helper to generate random interval.![GitHub stars](https://img.shields.io/github/stars/zekth/deno_random_interval?style=plastic) (Modules / Online Playgrounds)
- awesome-deno - deno_random_interval - Helper to generate random interval. (Modules / Utils)
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-50mssetTimeout(i.clear, 1000); // clear the interval after 1second
```